MrFangs
MrFangs
DIAdiscord.js - Imagine an app
Created by MrFangs on 8/31/2024 in #djs-questions
Just getting back into discord bots
ill look up how to do that
34 replies
DIAdiscord.js - Imagine an app
Created by MrFangs on 8/31/2024 in #djs-questions
Just getting back into discord bots
ok, also it works now thank you so much for helping me!
34 replies
DIAdiscord.js - Imagine an app
Created by MrFangs on 8/31/2024 in #djs-questions
Just getting back into discord bots
u know now that i think of it i do think so cause i remeber changing the token to another bot but not the app var.
34 replies
DIAdiscord.js - Imagine an app
Created by MrFangs on 8/31/2024 in #djs-questions
Just getting back into discord bots
ohh ok ty
34 replies
DIAdiscord.js - Imagine an app
Created by MrFangs on 8/31/2024 in #djs-questions
Just getting back into discord bots
welp i was trying to put in a txt file -_-
34 replies
DIAdiscord.js - Imagine an app
Created by MrFangs on 8/31/2024 in #djs-questions
Just getting back into discord bots
require ('dotenv').config(); const { Client, GatewayIntentBits, Partials, Routes, Collection } = require('discord.js') const client = new Client({ intents:[ GatewayIntentBits.GuildMessages, GatewayIntentBits.Guilds, GatewayIntentBits.MessageContent ], rest: {version: '10'}, partials: [Partials.Channel] }); const {TOKEN, APP, GUILD} = process.env; const {registerCommands} = require('./handler/registercommand'); client.rest.setToken(TOKEN); client.on('interactionCreate', (interaction) => { if (interaction.isChatInputCommand()) { const {commandName} = interaction; const cmd = client.slashCommands.get(commandName); if (cmd) { cmd.execute(client, interaction); } else { interaction.reply({content: 'Error running this slash command'}); } } }); async function main() { try { client.slashCommands = new Collection; await registerCommands(client, '../commands'); //console.log(client.slashCommands); const slashCommandsJson = client.slashCommands.map((cmd) => cmd.getSlashCommandJSON()); //console.log(slashCommandsJson); await client.rest.put(Routes.applicationCommands(APP), { body: slashCommandsJson, }); const registeredSlashCommands = await client.rest.get( Routes.applicationCommands(APP) ); //console.log(registeredSlashCommands); await client.login(TOKEN); } catch(err) { console.log(err) } } process.on("uncaughtException", (err) => { console.error('Uncaught Exception:', err); }); process.on("unhandledRejection", (reason, promise) => { console.error("[FATAL] Possibly Unhandled Rejection at: Promise", promise, "\nreason:", reason.message); }); main()
34 replies
DIAdiscord.js - Imagine an app
Created by MrFangs on 8/31/2024 in #djs-questions
Just getting back into discord bots
thought rest was something else ill show
34 replies
DIAdiscord.js - Imagine an app
Created by MrFangs on 8/31/2024 in #djs-questions
Just getting back into discord bots
oh one sec
34 replies
DIAdiscord.js - Imagine an app
Created by MrFangs on 8/31/2024 in #djs-questions
Just getting back into discord bots
thats the thing im not sure cause each file has one
34 replies
DIAdiscord.js - Imagine an app
Created by MrFangs on 8/31/2024 in #djs-questions
Just getting back into discord bots
imm thinking either a permission i forgot or something i didnt download
34 replies
DIAdiscord.js - Imagine an app
Created by MrFangs on 8/31/2024 in #djs-questions
Just getting back into discord bots
No description
34 replies
DIAdiscord.js - Imagine an app
Created by MrFangs on 8/31/2024 in #djs-questions
Just getting back into discord bots
ill just learn axios since uni is starting to go out dated kinda
34 replies
DIAdiscord.js - Imagine an app
Created by MrFangs on 8/31/2024 in #djs-questions
Just getting back into discord bots
also got another question if u dont mind trying to figure this out it pops up when i try to run it, think it might be cause im missing sommething
34 replies
DIAdiscord.js - Imagine an app
Created by MrFangs on 8/31/2024 in #djs-questions
Just getting back into discord bots
ok
34 replies
DIAdiscord.js - Imagine an app
Created by MrFangs on 8/31/2024 in #djs-questions
Just getting back into discord bots
truuuuuu
34 replies
DIAdiscord.js - Imagine an app
Created by MrFangs on 8/31/2024 in #djs-questions
Just getting back into discord bots
i dont know how to use them just saw unirest and learned that
34 replies
DIAdiscord.js - Imagine an app
Created by MrFangs on 8/31/2024 in #djs-questions
Just getting back into discord bots
No description
34 replies
DIAdiscord.js - Imagine an app
Created by MrFangs on 8/31/2024 in #djs-questions
Just getting back into discord bots
what would i use if i replaced punycode? or can i just use punycode for ever?
34 replies
DIAdiscord.js - Imagine an app
Created by MrFangs on 6/12/2023 in #djs-questions
Finding a role
i could have sworn i tried interaction im dumb tyyyy
6 replies
DIAdiscord.js - Imagine an app
Created by MrFangs on 6/2/2023 in #djs-questions
Sending a user a DM
wierd wonder why it didnt give me an error earlier
9 replies