1

我正在努力做到这一点,如果该频道有任何带有该用户名的消息说“@BLAH 1/3 Foul Language”,它将发送一条消息,它将检查然后发送一条新消息说“@BLAH 2/3粗话”

if (warningsChannel.Messages.ToString().Contains(e.User.Mention + " 1/3 foul language")) {
                    await warningsChannel.SendMessage(e.User.Mention + " 2/3 foul language");
                } else if(warningsChannel.Messages.ToString().Contains(e.User.Mention + " 2/3 foul language")){
                    await warningsChannel.SendMessage(e.User.Mention + " 3/3 foul language");
                } else if (warningsChannel.Messages.ToString().Contains(e.User.Mention + " 3/3 foul language")){
                   await warningsChannel.SendMessage(e.User.Mention + " has been kicked from our server for foul language.");
                    await e.User.Kick();
                }else if(warningsChannel.Messages.ToString().Contains("")){
                    await warningsChannel.SendMessage(e.User.Mention + " 1/3 foul language");
                }
4

1 回答 1

1

使用 await warningsChannel.DownloadMessages(amount);

但请注意不要下载超过 100 条消息。

于 2017-03-21T18:03:02.383 回答