Skip to content

Commit

Permalink
Better code with const in one line for discord.js stuffs
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasbnt committed Apr 19, 2022
1 parent e7b2b1b commit 9ea034b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/discord.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
const discord = require('discord.js')
const {MessageEmbed} = require("discord.js")
const {MessageEmbed, WebhookClient} = require("discord.js")
const MAX_MESSAGE_LENGTH = 40

module.exports.send = (id, token, repo, branch, url, commits, size) =>
new Promise((resolve, reject) => {
let client
console.log('Preparing Webhook...')
try {
client = new discord.WebhookClient({id: id, token: token})
client = new WebhookClient({id: id, token: token})
} catch (error) {
console.log('Error creating Webhook')
reject(error.message)
Expand Down

0 comments on commit 9ea034b

Please sign in to comment.