Moved env variables into function.
This commit is contained in:
@@ -9,8 +9,6 @@ const composer = new Composer<Context>();
|
||||
|
||||
const feature = composer.chatType(["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 "/groupStats"
|
||||
@@ -19,6 +17,8 @@ feature.hears(
|
||||
/^\/groupStats/,
|
||||
logHandle("groups-stats-command"),
|
||||
async (ctx: Context) => {
|
||||
const mutationKey = process.env.GRAPHQL_MUTATION_KEY || "";
|
||||
|
||||
await urql.mutation(increment, { trigger: true, mutationKey });
|
||||
|
||||
// Checks if the context includes a message property.
|
||||
|
||||
Reference in New Issue
Block a user