Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Ash
Discord Bot
Commits
81686021
Commit
81686021
authored
Aug 10, 2019
by
Tom Almeida
Browse files
Make the discord token a static variable
parent
0475b328
Changes
1
Show whitespace changes
Inline
Side-by-side
src/main.rs
View file @
81686021
...
...
@@ -8,6 +8,8 @@ use rand::Rng;
struct
Handler
;
static
DISCORD_TOKEN
:
&
str
=
include_str!
(
"discord_token"
);
static
SERVER_ID
:
u64
=
606351521117896704
;
// #general
static
MAIN_CHANNEL
:
serenity
::
model
::
id
::
ChannelId
=
...
...
@@ -290,7 +292,7 @@ impl EventHandler for Handler {
fn
main
()
{
// Configure the client with your Discord bot token in the environment.
let
token
=
include_str!
(
"discord_token"
)
;
let
token
=
DISCORD_TOKEN
;
// Create a new instance of the Client, logging in as a bot. This will
// automatically prepend your bot token with "Bot ", which is a requirement
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment