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,12 +8,14 @@ const composer = new Composer<Context>();
|
||||
|
||||
const feature = composer.chatType(["group", "supergroup", "private"]);
|
||||
|
||||
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 "/help"
|
||||
*/
|
||||
feature.hears(/^\/help/, logHandle("help"), async (ctx: Context) => {
|
||||
await urql.mutation(increment, { trigger: true });
|
||||
await urql.mutation(increment, { trigger: true, mutationKey });
|
||||
|
||||
// const GROUP_IDS = process.env.GROUP_IDS
|
||||
// ? process.env.GROUP_IDS.split(",")
|
||||
@@ -22,7 +24,7 @@ feature.hears(/^\/help/, logHandle("help"), async (ctx: Context) => {
|
||||
// Checks there is a chat and msg property in the context.
|
||||
if (ctx.chat && ctx.msg && ctx.msg.from) {
|
||||
await urql
|
||||
.mutation(increment, { command: true })
|
||||
.mutation(increment, { command: true, mutationKey })
|
||||
.toPromise()
|
||||
.then(async () => {
|
||||
if (ctx.msg && ctx.chat && ctx.msg.from) {
|
||||
|
||||
Reference in New Issue
Block a user