mirror of
https://github.com/xHyroM/roles-bot.git
synced 2024-11-21 16:11:04 +01:00
fix(bot): remove webhook after use
This commit is contained in:
parent
54c28c6bf4
commit
df7f84d1aa
1 changed files with 10 additions and 0 deletions
|
@ -158,6 +158,16 @@ export default async function (ctx: Context, data: Data) {
|
||||||
await ctx.editReply({
|
await ctx.editReply({
|
||||||
content: `Error: ${json.message} (${json.code})`,
|
content: `Error: ${json.message} (${json.code})`,
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
await fetch(
|
||||||
|
`${RouteBases.api}${Routes.webhook(
|
||||||
|
data.webhook.id,
|
||||||
|
data.webhook.token,
|
||||||
|
)}`,
|
||||||
|
{
|
||||||
|
method: "DELETE",
|
||||||
|
},
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue