fix: ignore other bots #22

Merged
pinks merged 1 commits from ignore-other-bots into main 2023-10-15 19:41:42 +00:00
2 changed files with 10 additions and 2 deletions

View File

@ -28,7 +28,11 @@ async function img2img(
includeRepliedTo: boolean,
state: QuestionState = {},
): Promise<void> {
if (!ctx.message?.from?.id) {
if (!ctx.from) {
return;
}
if (ctx.from.is_bot) {
return;
}

View File

@ -20,7 +20,11 @@ export async function txt2imgCommand(ctx: CommandContext<ErisContext>) {
}
async function txt2img(ctx: ErisContext, match: string, includeRepliedTo: boolean): Promise<void> {
if (!ctx.message?.from?.id) {
if (!ctx.from) {
return;
}
if (ctx.from.is_bot) {
return;
}