Reputation: 49
I've spent quite a long time looking through the docs but I couldn't figure out: how do you track the next message sent by a particular user?
[Command("Multi")]
[Description("Start a multiplayer training session")]
public async Task multi(CommandContext ctx, DiscordMember member, int pnum)
{
var intr = ctx.Client.GetInteractivityModule();
await ctx.RespondAsync("{member.Mention}, please respond with `Accept` to accept the party invite. ");
var reminderContent = await intr.WaitForMessageAsync(
c => c.Author.Id == ctx.Message.Author.Id,
TimeSpan.FromSeconds(60)
);
}
The documentation is here: https://dsharpplus.github.io/api/index.html
This is my first StackOverflow question; please tell me if I should include some more info! Thanks!
Upvotes: 1
Views: 842
Reputation: 1
if you are trying to track the reply you could simply do it via channel id. You are on point other then ctx.message.Author.id is going to produce the bots id since the bot sent the message by the bot. So all that is doing is waiting for the bots next message instead you would do member that will return who got @'d in the command.
[Command("Multi")]
[Description("Start a multiplayer training session")]
public async Task multi(CommandContext ctx, DiscordMember member, int pnum)
{
var intr = ctx.Client.GetInteractivityModule();
await ctx.RespondAsync("{member.Mention}, please respond with `Accept` to accept the party invite. ");
var reminderContent = await intr.WaitForMessageAsync(
c => c.Author.Id == member.Id,
TimeSpan.FromSeconds(60)
);
}
Upvotes: 0