This commit is contained in:
IvanGrail 2021-12-27 20:18:07 +01:00
parent 9bdaba1899
commit f2239db62c
5 changed files with 41 additions and 2 deletions

View file

@ -0,0 +1,13 @@
# Default ignored files
/shelf/
/workspace.xml
# Rider ignored files
/projectSettingsUpdater.xml
/.idea.MediaFixer.iml
/contentModel.xml
/modules.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" addBOMForNewFiles="with BOM under Windows, with no BOM otherwise" />
</project>

View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="UserContentModel">
<attachedFolders />
<explicitIncludes />
<explicitExcludes />
</component>
</project>

View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

View file

@ -1,6 +1,7 @@
const mySecret = process.env['TOKEN']
// Require the necessary discord.js classes
const { Client, Intents } = require('discord.js');
const http = require('http');
require('discord-reply'); // IMPORTANT: put this before your discord.Client()
// Create a new client instance
const client = new Client({
@ -10,6 +11,14 @@ const client = new Client({
]
});
http.createServer((req, res) => {
res.writeHead(200, {
'Content-type': 'text/plain'
});
res.write('Hey');
res.end();
}).listen(4000);
// When the client is ready, run this code (only once)
client.once('ready', () => {
console.log('Ready!');
@ -28,5 +37,4 @@ client.on('messageCreate', async message => {
});
// Login to Discord with your client's token
//client.login(process.env.TOKEN);
client.login(mySecret);
client.login(mySecret);