Bugfix hopefully
This commit is contained in:
parent
6fa715fb8b
commit
8dc57444b2
@ -384,7 +384,7 @@ export type BaseInfractionData = {
|
||||
arguments?: InfractionArguments,
|
||||
targetType?: InfractionTargetType,
|
||||
guild: GuildWrapper,
|
||||
channel?: GuildTextBasedChannel,
|
||||
channel?: GuildTextBasedChannel | null,
|
||||
invoker?: InvokerWrapper | null,
|
||||
target?: MemberWrapper | UserWrapper | GuildTextBasedChannel,
|
||||
executor?: MemberWrapper | UserWrapper
|
||||
|
@ -554,8 +554,8 @@ class ModerationManager implements Initialisable
|
||||
{
|
||||
const executor = await guild.memberWrapper(i.executor!).catch(() => null) ?? await guild.memberWrapper(guild.me!);
|
||||
const channel = guild.channels.resolve(i.channel!);
|
||||
if (!channel?.isTextBased())
|
||||
throw new Error('Bad channel');
|
||||
if (channel && !channel.isTextBased())
|
||||
throw new Error('Bad channel ' + inspect(i));
|
||||
if (!executor)
|
||||
throw new Error('Missing executor');
|
||||
try
|
||||
|
Loading…
Reference in New Issue
Block a user