Bot should no longer always notify server level gains

This commit is contained in:
Kwoth
2022-07-11 02:57:24 +02:00
parent 1396d9d55a
commit 7885106266

View File

@@ -318,8 +318,11 @@ public class XpService : INService, IReadyExecutor, IExecNoCommand
long newLevel,
XpNotificationLocation notifyLoc)
{
var user = await _client.GetUserAsync(userId);
if (notifyLoc == XpNotificationLocation.None)
return;
var guild = _client.GetGuild(guildId);
var user = guild?.GetUser(userId);
var ch = guild?.GetTextChannel(channelId);
if (user is null || guild is null)