Skip to content

Commit

Permalink
Revert "fix poll bug maybe"
Browse files Browse the repository at this point in the history
This reverts commit 4bd8b1f.
  • Loading branch information
3vorp committed Oct 11, 2023
1 parent 4bd8b1f commit 515c411
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 23 deletions.
4 changes: 2 additions & 2 deletions src/client/automation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ export class Automation {
}
}

private pollCheck(p: Poll) {
private pollCheck(p: Poll): void {
const poll = new Poll(p); // get methods back

if (poll.isTimeout()) {
poll.setStatus("ended");
poll.updateEmbed(this.client).then(() => this.client.polls.delete(poll.id)).catch(() => {});
poll.updateEmbed(this.client).then(() => this.client.polls.delete(poll.id));
}
}
}
2 changes: 0 additions & 2 deletions src/client/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,6 @@ export class ExtendedClient extends Client {
this.loadComponents();
this.loadEvents();
this.loadCollections();

this.automation.start();
});

// I know this restarting stuff kinda sucks but you can't guarantee which one is triggered
Expand Down
17 changes: 0 additions & 17 deletions src/commands/bot/shutdown.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/helpers/functions/errorHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export async function errorHandler(client: Client, error: any, type: string) {

let eprotoError = false;
let description = error.stack;
let codeBlocks = " ";
let codeBlocks = "";

if (error.isAxiosError) {
// axios errors are JSON
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/utility/handleJSON.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export function getData(options: GetOptions) {
* @param options data to set
*/
export function setData(options: SetOptions) {
const folder = path.resolve(__dirname, options.relative_path);
let folder = path.resolve(__dirname, options.relative_path);
const file = path.resolve(folder, options.filename);

try {
Expand Down

0 comments on commit 515c411

Please sign in to comment.