Skip to content

Commit

Permalink
Update simpleBot.js example (add intents)
Browse files Browse the repository at this point in the history
Signed-off-by: Wade <wade@dinographicpixels.com>
  • Loading branch information
pakkographic authored Sep 24, 2024
1 parent 90caabc commit 7fdf889
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions examples/simpleBot.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Imports
const { Client } = require("touchguild"); // JavaScript/TS (CommonJS)
const { Client, GatewayLayerIntent } = require("touchguild"); // JavaScript/TS (CommonJS)
// TypeScript/JavaScript (ES): import { Client } from "touchguild";

// Configuration
Expand All @@ -9,7 +9,10 @@ const config = {
}

// Constructing the Client, passing the token into it.
const client = new Client({ token: config.token });
const client = new Client({
token: config.token,
intents: [GatewayLayerIntent.GUILD_MESSAGES, GatewayLayerIntent.MESSAGE_CONTENT]
});

// Map that will contain settings for each registered guild.
const guildSettingsMap = new Map();
Expand Down

0 comments on commit 7fdf889

Please sign in to comment.