Exemple #1
0
        public async void Execute(object parameter)
        {
            if (parameter is DiscordMember member)
            {
                var banDialog = new BanDialog(member);
                var result    = await banDialog.ShowAsync();

                if (result == ContentDialogResult.Primary)
                {
                    await member.BanAsync(banDialog.DeleteMessageDays, banDialog.BanReason);
                }
            }
        }
Exemple #2
0
        public async void Execute(object parameter)
        {
            if (parameter is DiscordMember member)
            {
                Analytics.TrackEvent("BanCommand_Invoked");

                var banDialog = new BanDialog(member);
                var result    = await banDialog.ShowAsync();

                if (result == ContentDialogResult.Primary)
                {
                    Analytics.TrackEvent("BanCommand_BanMember");
                    await member.BanAsync(banDialog.DeleteMessageDays, banDialog.BanReason);
                }
            }
        }