0

but I don't know how, any help? its like (prefix)remind 10h {message} a reminder I use c#

this is a message sender, but I can't seem to make it so it sends the message at a specified time

    public async Task sayAsync([Remainder] string message)
    {
        DiscordSocketClient client = new DiscordSocketClient();
        ulong channelID = (channelid);

        var channel = client.GetChannel(channelID) as SocketTextChannel;
        await channel.SendMessageAsync(message);

    }```
Rexi
  • 1
  • https://stackoverflow.com/questions/12535722/what-is-the-best-way-to-implement-a-timer – Maze Nov 15 '20 at 11:40
  • Even without the added complexity of sending the message at a specific time. This code would not work to send a message at all. You cannot create a new instance of DiscordSocketClient and use it without even logging in. Generally you should only have ONE instance of the DiscordSocketClient used throughout your entire application. That being the instance that you called LoginAsync and StartAsync on. – Anu6is Nov 16 '20 at 12:07

0 Answers0