Added mutation key to features.
Main / build-and-push-docker-image (20.x) (push) Successful in 3m32s
Main / build-and-push-docker-image (20.x) (push) Successful in 3m32s
This commit is contained in:
@@ -8,6 +8,8 @@ const composer = new Composer<Context>();
|
||||
|
||||
const feature = composer.chatType(["private", "group", "supergroup"]);
|
||||
|
||||
const mutationKey = process.env.GRAPHQL_MUTATION_KEY || "";
|
||||
|
||||
/**
|
||||
* What triggers this feature and adds to the log when it has been triggered.
|
||||
* The trigger is the command "/botInfo"
|
||||
@@ -16,7 +18,7 @@ feature.hears(
|
||||
/^\/botInfo/,
|
||||
logHandle("bot-info-command"),
|
||||
async (ctx: Context) => {
|
||||
await urql.mutation(increment, { trigger: true });
|
||||
await urql.mutation(increment, { trigger: true, mutationKey });
|
||||
|
||||
// Checks if the context includes a message property.
|
||||
if (ctx.msg && ctx.chat && ctx.msg.from) {
|
||||
@@ -30,7 +32,7 @@ feature.hears(
|
||||
}
|
||||
|
||||
await urql
|
||||
.mutation(increment, { command: true })
|
||||
.mutation(increment, { command: true, mutationKey })
|
||||
.toPromise()
|
||||
.then(async () => {
|
||||
if (ctx.msg) {
|
||||
|
||||
Reference in New Issue
Block a user