Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
lxRbckl committed Feb 26, 2024
1 parent 732159e commit 303179c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
20 changes: 12 additions & 8 deletions source/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,12 @@ class client {
this.guildId = process.env.guildId;
this.channelId = process.env.channelId;
this.applicationId = process.env.applicationId;
this.commands = {'update' : new update(pSupervisor)};

this.commands = {

'update' : new update(pSupervisor)

};

this.client = new Client({

Expand All @@ -53,7 +58,7 @@ class client {
message(content) {

let channel = this.client.channels.cache.get(this.channelId);
channel.send(content);
channel.send('`' + content + '`');

}

Expand All @@ -65,7 +70,7 @@ class client {
let command = this.commands[interaction.commandName];
let result = await command.run();

await this.message(result);
this.message(result);

});

Expand All @@ -90,8 +95,8 @@ class client {

async run() {

// register slash command <
// activate interaction, schedule <
let commands = Object.values(this.commands);

this.client.login(this.token);
this.client.rest.put(

Expand All @@ -101,14 +106,13 @@ class client {
this.guildId

),
{body : Object.values(this.commands).map((i) => {return i.context();})}
{body : commands.map(c => c.context())}

);

this.listen();
this.schedule();

// >

}

}
Expand Down
4 changes: 2 additions & 2 deletions source/supervisor.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ class supervisor {

// if (success) <
// if (failure) <
true : '`File updated.`',
false : '`File failed to update.`'
true : 'File updated.',
false : 'File failed to update.'

// >

Expand Down

0 comments on commit 303179c

Please sign in to comment.