-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* import/export * eslint && prettier * ts * ts * uh * Code * Types * code i think * works * Swap fetch packages * lint fixs * Event Logging * Fixes * Compile/build changes * bump deps * add missing package * prettier
- Loading branch information
Showing
43 changed files
with
2,126 additions
and
2,630 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
**Changes** | ||
|
||
<!-- Please explain the changes that you have made --> | ||
|
||
- [ ] I've added new features | ||
- [ ] I've fixed bug. (_optional_ you can mention a issue if there is one) | ||
- [ ] I've corrected the spelling in README, documentation, etc. | ||
- [ ] I've fixed my eslint errors. (`npm run lint`) | ||
- [ ] I've fixed my formatting. (`npm run prettier`) | ||
- [ ] I've made sure it builds. (`npm run build`) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
/config.json | ||
node_modules/ | ||
package-lock.json | ||
a.js | ||
b.js | ||
.VSCodeCounter/ | ||
logs/ | ||
logs/ | ||
dist/ |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { deployCommands } from './src/functions/deployCommands'; | ||
import { Client, Events, GatewayIntentBits } from 'discord.js'; | ||
import { execute } from './src/events/ready'; | ||
import { discord } from './config.json'; | ||
|
||
const client = new Client({ | ||
intents: [ | ||
GatewayIntentBits.MessageContent, | ||
GatewayIntentBits.GuildMessages, | ||
GatewayIntentBits.GuildMembers, | ||
GatewayIntentBits.Guilds, | ||
], | ||
}); | ||
|
||
deployCommands(client); | ||
|
||
client.on(Events.ClientReady, () => { | ||
execute(client); | ||
}); | ||
|
||
client.login(discord.token); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
import { | ||
ChatInputCommandInteraction, | ||
SlashCommandBuilder, | ||
ActionRowBuilder, | ||
ColorResolvable, | ||
ButtonBuilder, | ||
EmbedBuilder, | ||
ButtonStyle, | ||
} from 'discord.js'; | ||
import { generateID, cleanMessage } from '../functions/helper'; | ||
import { errorMessage } from '../functions/logger'; | ||
import { discord, other } from '../../config.json'; | ||
import { version } from '../../package.json'; | ||
|
||
export const data = new SlashCommandBuilder() | ||
.setName('about') | ||
.setDescription('Shows info about the bot') | ||
.setDMPermission(false); | ||
|
||
export const execute = async (interaction: ChatInputCommandInteraction) => { | ||
try { | ||
const row = new ActionRowBuilder<ButtonBuilder>().addComponents( | ||
new ButtonBuilder().setLabel('source').setURL('https://github.com/Kathund/WynnTools').setStyle(ButtonStyle.Link), | ||
new ButtonBuilder().setLabel('support').setURL(discord.supportInvite).setStyle(ButtonStyle.Link), | ||
new ButtonBuilder().setLabel('invite').setURL(discord.botInvite).setStyle(ButtonStyle.Link) | ||
); | ||
const embed = new EmbedBuilder() | ||
.setTitle(`WynnTools Utils Stats`) | ||
.setColor(other.colors.green.hex as ColorResolvable) | ||
.setTimestamp() | ||
.setDescription( | ||
'WynnTools - A bot that does stuff with the wynncraft api - The Only bot that uses images **that i have seen**' | ||
) | ||
.addFields({ | ||
name: 'General', | ||
value: `<:Dev:1130772126769631272> Developer - \`@kathund\`\n<:bullet:1064700156789927936> Version \`${version}\`\nUptime - <t:${Math.floor( | ||
(Date.now() - interaction.client.uptime) / 1000 | ||
)}:R>`, | ||
inline: true, | ||
}) | ||
.setFooter({ | ||
text: `by @kathund | ${discord.supportInvite} for support`, | ||
iconURL: other.logo, | ||
}); | ||
await interaction.reply({ embeds: [embed], components: [row] }); | ||
} catch (error: any) { | ||
const errorId = generateID(other.errorIdLength); | ||
errorMessage(`Error Id - ${errorId}`); | ||
errorMessage(error); | ||
const errorEmbed = new EmbedBuilder() | ||
.setColor(other.colors.red.hex as ColorResolvable) | ||
.setTitle('An error occurred') | ||
.setDescription( | ||
`Use </report-bug:${ | ||
discord.commands['report-bug'] | ||
}> to report it\nError id - ${errorId}\nError Info - \`${cleanMessage(error)}\`` | ||
) | ||
.setFooter({ text: `by @kathund | ${discord.supportInvite} for support`, iconURL: other.logo }); | ||
const row = new ActionRowBuilder<ButtonBuilder>().addComponents( | ||
new ButtonBuilder().setLabel('Support Discord').setURL(discord.supportInvite).setStyle(ButtonStyle.Link) | ||
); | ||
await interaction.reply({ embeds: [errorEmbed], components: [row] }); | ||
} | ||
}; |
Oops, something went wrong.