forked from pinks/eris
fix: ignore other bots (#22)
fixes #5 Reviewed-on: pinks/eris#22 Co-authored-by: Vargoshi <marcinflisak1998@gmail.com> Co-committed-by: Vargoshi <marcinflisak1998@gmail.com>
This commit is contained in:
parent
5a241ff13c
commit
cd3b53018a
|
@ -28,7 +28,11 @@ async function img2img(
|
||||||
includeRepliedTo: boolean,
|
includeRepliedTo: boolean,
|
||||||
state: QuestionState = {},
|
state: QuestionState = {},
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
if (!ctx.message?.from?.id) {
|
if (!ctx.from) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ctx.from.is_bot) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,11 @@ export async function txt2imgCommand(ctx: CommandContext<ErisContext>) {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function txt2img(ctx: ErisContext, match: string, includeRepliedTo: boolean): Promise<void> {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue