Fixed a permission bug
This commit is contained in:
parent
49fbbbd325
commit
e646debda5
@ -1,6 +1,5 @@
|
|||||||
using Discord;
|
using Discord;
|
||||||
using Discord.Commands;
|
using Discord.Commands;
|
||||||
using ImageSharp;
|
|
||||||
using NadekoBot.Attributes;
|
using NadekoBot.Attributes;
|
||||||
using NadekoBot.Extensions;
|
using NadekoBot.Extensions;
|
||||||
using NadekoBot.Services;
|
using NadekoBot.Services;
|
||||||
@ -10,7 +9,6 @@ using System.IO;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using ImageSharp.Formats;
|
|
||||||
using Image = ImageSharp.Image;
|
using Image = ImageSharp.Image;
|
||||||
|
|
||||||
namespace NadekoBot.Modules.Gambling
|
namespace NadekoBot.Modules.Gambling
|
||||||
|
@ -106,19 +106,13 @@ namespace NadekoBot.Modules.Permissions
|
|||||||
switch (perm.PrimaryTarget)
|
switch (perm.PrimaryTarget)
|
||||||
{
|
{
|
||||||
case PrimaryPermissionType.User:
|
case PrimaryPermissionType.User:
|
||||||
if (guild == null)
|
com += guild?.GetUser(perm.PrimaryTargetId).ToString() ?? $"<@{perm.PrimaryTargetId}>";
|
||||||
com += $"<@{perm.PrimaryTargetId}>";
|
|
||||||
else
|
|
||||||
com += guild.GetUser(perm.PrimaryTargetId).ToString() ?? $"<@{perm.PrimaryTargetId}>";
|
|
||||||
break;
|
break;
|
||||||
case PrimaryPermissionType.Channel:
|
case PrimaryPermissionType.Channel:
|
||||||
com += $"<#{perm.PrimaryTargetId}>";
|
com += $"<#{perm.PrimaryTargetId}>";
|
||||||
break;
|
break;
|
||||||
case PrimaryPermissionType.Role:
|
case PrimaryPermissionType.Role:
|
||||||
if(guild == null)
|
com += guild?.GetRole(perm.PrimaryTargetId)?.ToString() ?? $"<@&{perm.PrimaryTargetId}>";
|
||||||
com += $"<@&{perm.PrimaryTargetId}>";
|
|
||||||
else
|
|
||||||
com += guild.GetRole(perm.PrimaryTargetId).ToString() ?? $"<@{perm.PrimaryTargetId}>";
|
|
||||||
break;
|
break;
|
||||||
case PrimaryPermissionType.Server:
|
case PrimaryPermissionType.Server:
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user