Beispiel #1
0
        private async Task Client_GuildMemberAdded(GuildMemberAddEventArgs e)
        {
            GuildData d = new HackBanCommand().GetData <GuildData>(e.Guild.Id.ToString());

            if (d?.Hackbans.Any(b => b.User == e.Member.Id) == true)
            {
                await e.Member.BanAsync(reason : "Hackban by WamBot");
            }
        }
Beispiel #2
0
        private async Task Client_ChannelPinsUpdated(ChannelPinsUpdateEventArgs e)
        {
            if (e.Channel.Guild != null)
            {
                GuildData d = new HackBanCommand().GetData <GuildData>(e.Channel.GuildId.ToString());

                await UpdatePinsAsync(e.LastPinTimestamp, e.Channel, d, e.Client);

                new HackBanCommand().SetData(e.Channel.GuildId.ToString(), d);
            }
        }