Upgraded dicord.net
This commit is contained in:
		@@ -109,7 +109,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
            {
 | 
			
		||||
                try
 | 
			
		||||
                {
 | 
			
		||||
                    await (await user.CreateDMChannelAsync()).EmbedAsync(new EmbedBuilder().WithErrorColor()
 | 
			
		||||
                    await (await user.GetOrCreateDMChannelAsync()).EmbedAsync(new EmbedBuilder().WithErrorColor()
 | 
			
		||||
                                     .WithDescription(GetText("warned_on", Context.Guild.ToString()))
 | 
			
		||||
                                     .AddField(efb => efb.WithName(GetText("moderator")).WithValue(Context.User.ToString()))
 | 
			
		||||
                                     .AddField(efb => efb.WithName(GetText("reason")).WithValue(reason ?? "-")))
 | 
			
		||||
 
 | 
			
		||||
@@ -154,7 +154,7 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
                        }
 | 
			
		||||
                        try
 | 
			
		||||
                        {
 | 
			
		||||
                            await (await Context.User.CreateDMChannelAsync())
 | 
			
		||||
                            await (await Context.User.GetOrCreateDMChannelAsync())
 | 
			
		||||
                                .EmbedAsync(new EmbedBuilder().WithOkColor()
 | 
			
		||||
                                .WithTitle(GetText("shop_purchase", Context.Guild.Name))
 | 
			
		||||
                                .AddField(efb => efb.WithName(GetText("item")).WithValue(item.Text).WithIsInline(false))
 | 
			
		||||
 
 | 
			
		||||
@@ -96,7 +96,7 @@ namespace NadekoBot.Modules.Help
 | 
			
		||||
 | 
			
		||||
            if (com == null)
 | 
			
		||||
            {
 | 
			
		||||
                IMessageChannel ch = channel is ITextChannel ? await ((IGuildUser)Context.User).CreateDMChannelAsync() : channel;
 | 
			
		||||
                IMessageChannel ch = channel is ITextChannel ? await ((IGuildUser)Context.User).GetOrCreateDMChannelAsync() : channel;
 | 
			
		||||
                await ch.SendMessageAsync(HelpString).ConfigureAwait(false);
 | 
			
		||||
                return;
 | 
			
		||||
            }
 | 
			
		||||
 
 | 
			
		||||
@@ -32,7 +32,7 @@ namespace NadekoBot.Modules
 | 
			
		||||
            _log = LogManager.GetCurrentClassLogger();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        protected override void BeforeExecute()
 | 
			
		||||
        protected override void BeforeExecute(CommandInfo cmd)
 | 
			
		||||
        {
 | 
			
		||||
            _cultureInfo = _localization.GetCultureInfo(Context.Guild?.Id);
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
@@ -667,7 +667,7 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
            str += new NadekoRandom().Next();
 | 
			
		||||
            foreach (var usr in allUsrsArray)
 | 
			
		||||
            {
 | 
			
		||||
                await (await usr.CreateDMChannelAsync()).SendConfirmAsync(str).ConfigureAwait(false);
 | 
			
		||||
                await (await usr.GetOrCreateDMChannelAsync()).SendConfirmAsync(str).ConfigureAwait(false);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user