示例#1
0
        public async Task NoticeMessageCommand(SocketTextChannel channel, ulong messageId)
        {
            var msg = await channel.GetMessageAsync(messageId);

            if (msg == null)
            {
                await Context.ReplyAsync($"Unable to find message with such id in channel `{channel.Name}`.");

                return;
            }

            if (!(msg is SocketMessage socketMessage))
            {
                socketMessage = ((RestUserMessage)msg).ToSocketUserMessage(channel);
            }

            await Context.ReplyAsync($"Reprocessing message {messageId}...");

            await MessageSystem.MessageReceived(socketMessage);
        }