Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SL-Projects Bot
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sofiane Lasri
SL-Projects Bot
Commits
d6b892f4
Commit
d6b892f4
authored
2 years ago
by
Sofiane Lasri
Browse files
Options
Downloads
Patches
Plain Diff
Mise à jour du bot pour qu'il puisse fonctionner avec le nouveau système d'intent.
parent
a8e6a1bf
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
.env
+16
-0
16 additions, 0 deletions
.env
index.js
+9
-2
9 additions, 2 deletions
index.js
with
25 additions
and
2 deletions
.env
0 → 100644
+
16
−
0
View file @
d6b892f4
DISCORD_BOT_TOKEN=ODMwMzYwOTA5NTE1OTgwODEw.GT6S6x.lJSvZrNElmyFOO612WVyiNpxzxHhnglVl4oG60
CLIENT_ID=830360909515980810
GUILD_ID=815138534704939039
BDD_HOST=node.sl-projects.com
BDD_NAME=srvMinecraft
BDD_USER=srvMinecraft
BDD_PASSWORD=YIn2hTln5iMQap1W
ROLE_ANNIV=949734406409556038
ROLE_ADMIN=830359225972162561
CANAL_GENERAL=815138535413121056
CANAL_LOG=830362795588452363
CANAL_CHAT_MC=950009038291222589
CANAL_CHAT_MC_DEV=830362795588452363
PORT_MSG_SRVMC=25575
\ No newline at end of file
This diff is collapsed.
Click to expand it.
index.js
+
9
−
2
View file @
d6b892f4
...
...
@@ -276,11 +276,18 @@ recursiveAsyncReadLine(); //we have to actually start our recursion somehow
// BOT DISCORD
////////////////////////////////////////////////////////////////
// require the needed discord.js classes
const
{
Client
,
Intents
,
MessageActionRow
,
MessageButton
,
WebhookClient
}
=
require
(
'
discord.js
'
);
const
{
Client
,
Gateway
Intent
Bit
s
,
MessageActionRow
,
MessageButton
,
WebhookClient
}
=
require
(
'
discord.js
'
);
const
{
verify
}
=
require
(
'
crypto
'
);
// create a new Discord client
const
client
=
new
Client
({
intents
:
[
"
GUILDS
"
,
"
GUILD_MESSAGES
"
,
"
DIRECT_MESSAGES
"
,
"
GUILD_MEMBERS
"
]
});
const
client
=
new
Client
({
intents
:
[
GatewayIntentBits
.
Guilds
,
GatewayIntentBits
.
GuildMessages
,
GatewayIntentBits
.
GuildMembers
,
GatewayIntentBits
.
DirectMessages
]
})
var
mcChatWebhook
,
devMcChatWebhook
;
client
.
on
(
"
ready
"
,
async
function
()
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment