コード例 #1
0
        public async static Task OnUserBanned(SocketUser user, SocketGuild guild)
        {
            Logging.BannedUser(user, guild);
            try
            {
                IBan ban = guild.GetBanAsync(user) as IBan;
                await user.CreateDMChannelAsync();

                await user.SendMessageAsync($"You were banned from the Terraria Builders Community for reason: {ban.Reason} | In case of interest to appeal this ban, do this at https://terrariabuilders.com/community");

                await Task.CompletedTask;
            }
            catch
            {
                await Task.CompletedTask;
            }
            return;
        }