你好,我一直在Discord.net中开发一个机器人,到目前为止它做得很好。不过,我遇到的问题是,我试图使用一个选项使用来自GetMessagesAsync的ITextChannel。不幸的是,我不知道如何启动RequestOptions,我试图搜索文献资料,但一无所获。
private ulong SearchMessageByMessageLink(ulong messageId, ITextChannel channel)
{
var messageList = GetMessagesAsync(100, channel,options:[{around:messageId}]);//fix
return 1;
}
public IAsyncEnumerable<IReadOnlyCollection<IMessage>> GetMessagesAsync(ulong id, ITextChannel channel, RequestOptions options)
{
CacheMode mode = CacheMode.AllowDownload;
IAsyncEnumerable<IReadOnlyCollection<IMessage>> messageList = channel.GetMessagesAsync(100, mode, options);
return messageList;
}我想知道Discord.net是否可以使用can :messageId雪花特性。
发布于 2020-12-01 17:17:12
https://stackoverflow.com/questions/65091995
复制相似问题