#development
1 messages · Page 1074 of 1
yes
k
Looks good
luv u discord api
.then((message) => {
setTimeout(function() {
message.delete()
}, 3000)})
``` i think this will do
@fresh hatch spppoooooonfeeeeed 

ayo, spoonfeeding check ✔️
Since when does that emoji exist xd

commands
show the code please
i tried:
bot.on("message", message => {
var guildID = message.guild.id;
//smh it gives error "Cannot read property id of null"
});
oh that's js?
sorry idk about js
wait what it work's now
are you messaging it in dm
smh
lol?
are you messaging it in dm
no
if its a dm guild doesnt exist
lol do u have a server in ur dm?
because a dm is not a guild
wtf
thats msg.channel.id
@slender thistle ammm u asked about the code so i sent it
it is giving error in var guildID = message.guild.id; but no error in message.reply(message.guild.id);
SMH
peek at my source on https://glitch.com/~codecodiscordbot
how about i use vsc to replace every single guildID with message.guild.id
tonkku staring at my code
why
are you using node 14
How reload command work . I want make a reload command
and I mean node not djs
well sad
check my package.json
@bitter sundial so i will delete the old bot in Top.gg and submit my new one
is it okay?
but you could just return if guild doesnt exist
How reload command work . I want make a reload command
@robust moth basically it kills the current process and starts a new one
Ok
but you could just return if guild doesnt exist
or use visual studio code to replace eveyr singleguildIDwithmessage.guild.id
@regal jacinth you can but I'm sure you're gonna end up waiting another 4 weeks for nothing
lol
well my old one wont work anyway
that doesnt solve the error you were talking about
What library is luca in?
djs
what does luca benefit from that
Eris doesn't save that much ram
dsl uses eris
then what should i do?
i don't know what is wrong with the code
it was working fine for 4 months(since i started codding)
and all of a sudden it broke
Yeah
have you checked if your bot breaks when its missing permissions
no?
i did not ig
it well send the error in the terminal
like "Missing Permissions"
are you sure it does for everything
i don't know if it does for everything
i only tested it once with the help command
because i got denied cuz of it
but all the codes are the same ig
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: Forbidden: 403 Forbidden (error code: 50013): Missing Permissions i tried the kick command with zero permissions and i got that
??
Guys does anyone have any ideas for open source projects I can make to put on my github profile?
@bitter sundial hey
sorry to ping u but is it okay to invite the bot here and see if it breaks again or not
if it does then the problem was with my code
if it doesn't then probably with the application it self
That’s already a thing
uh yeah?
I asked for ideas though not already made projects
they're both the same thing but ok
ok so this is weird. When I'm starting my bot with the guild_members intent that I haven't turned on on the dev portal, I can't start the bot. But without using intents when I start it everything is fine lol
and it states its not already made but ok :p
yes, new Discord.Client()
but well it's a bit weird but I think that will change 7 Oct
i believe its GUILD_MEMBERS
Caps
oh I did that
what I mean is if you don't specify intents it's no problem, but when you are specifying them and didn't enable one on the dev portal it gives an error
Whats the error
@nocturne grove I don't recommending turning on the privileged intents.
Because then your bot will be limited to 100 servers.
that's not true
Later on.
you can get them if you have a reason for it
@nocturne grove When Oct 7 came.
If you want to turn on intents because soon it will be required to.
I recommend using other intents.
you can't choose which intents you want to use if you want your bot to do something. I just need guild_members for small things
Why you need that tbh?
My bot doesn't play music anymore 
I atleast need it for my support server only and I'm now working on a feature which will log what members joined/left and what members got/were removed from a role for my counter system
Some YouTube issue jeez
@inner quarry ^
@nocturne grove I see.
@robust moth is there a file/folder called a in that folder?
you can use privileged intents above 100 guilds if you are verified iirc
Enjoy mobile hosting
now everyone can use them tho
Which bots are there in testing channels?
the event is still being sent regardless of the intent
everyone can use them except bots with 100+ that didn't apply for them, after 7 Oct
that
the event is still being sent regardless of the intent
@earnest phoenix what do you mean? If I turnguild_presencesoff I won't receive them right?
@restive pebble right now I am outside at home
Oh cool
yeah i worded myself badly, what i meant is that everyone can still use the normal events regardless of the intent existing (if you don't login with intents enabled)
on oct 7th that will no longer be possible
@nocturne grove MY bot get for VERIFICATION before 15 day but can't verify still now
np mate but what did you mean that it will be sent regardless of the intent? Or is that about before 7 Oct?
@robust moth is there a file/folder called
ain that folder?
@nocturne groveais demo folder
lol why you're using caps. Well it takes some time @midnight fiber
help.js is inside ./commands/info/help.js
np mate but what did you mean that it will be sent regardless of the intent? Or is that about before 7 Oct?
@nocturne grove
right now you still have the option to not use intents, if you choose to do so you can still receive all events normally
my bot is not verified till 1 month alredy been verified it fast
d.js?
did you disabled for some reason the caching of guilds?
no
umm
you get the guild object from the message
did you disabled for some reason the caching of guilds?
@lusty quest i haven't did anything to the guulds
Yeah
Peek at my source
Oh hi thanks for checking out my discord bot! Visit the support server at discord.gg/NZYPF23 🎏 Glitch is the friendly community where everyone can discover & create the best apps on the web.
message.guild.id is valid
@lusty quest it gives the error Cannot read property id of null
aaaaaaaaaaaaaaaaaaaaaaaaaaaaa
@tight plinth lol
u know glitch is not meant to do discord bots right
Yo, uh can anybody help
I'm gettin this error
Error: StatusCodeError: 403 - ""
at C:\Users\Administrator\Desktop\Team Thunder\node_modules\youtube-info\index.js:101:15
at tryCatcher (C:\Users\Administrator\Desktop\Team Thunder\node_modules\bluebird\js\release\util.js:16:23)
at Promise._settlePromiseFromHandler (C:\Users\Administrator\Desktop\Team Thunder\node_modules\bluebird\js\release\promise.js:547:31)
at Promise._settlePromise (C:\Users\Administrator\Desktop\Team Thunder\node_modules\bluebird\js\release\promise.js:604:18)
at Promise._settlePromise0 (C:\Users\Administrator\Desktop\Team Thunder\node_modules\bluebird\js\release\promise.js:649:10)
at Promise._settlePromises (C:\Users\Administrator\Desktop\Team Thunder\node_modules\bluebird\js\release\promise.js:725:18)
at _drainQueueStep (C:\Users\Administrator\Desktop\Team Thunder\node_modules\bluebird\js\release\async.js:93:12)
at _drainQueue (C:\Users\Administrator\Desktop\Team Thunder\node_modules\bluebird\js\release\async.js:86:9)
at Async._drainQueues (C:\Users\Administrator\Desktop\Team Thunder\node_modules\bluebird\js\release\async.js:102:5)
at Immediate.Async.drainQueues [as _onImmediate] (C:\Users\Administrator\Desktop\Team Thunder\node_modules\bluebird\js\release\async.js:15:14)
at processImmediate (internal/timers.js:456:21)
@earnest phoenix does it say what line?
You aren't allowed to access the webpage
@earnest phoenix does it say what line?
@lusty quest yes
Lemme check the logs
Guys does anyone have any ideas for open source projects I can make to put on my github profile? (Something unique would be great)
@swift void did you authenticate your API request?
It should be the first line after bot.on("message")
I don't know
I swear there is no error with that
show code
@earnest phoenix make some website with server side code
@earnest phoenix make a replacement for VAC but community driven
@lusty quest i only code nodejs
403 Forbidden usually means you can't access the webpage (either you're not authenticated or you're not allowed to view it)
@honest perch thats too vague lmao
Smth unique :/
Ip banned should return 429
make a bot that call everyone who mentions him stupid
For example I'm currently making a bot dashboard
@swift void discord api?
phew, I'm not ip banned
Youtube didn't he say
google youtube info api
Oh ok
429 is too many requests
reeeeee
It means rate limited
dang I'm gettin rate limited
ip ban isn't rate limited
isn't youtube blocking my requests
@lusty quest check the first line below bot.on("message", message => {});
That's where the problem is
Everywhere else is fine
where tf is your bot.on Message? the entire file is a mess
C!guildid works fine
where tf is your bot.on Message? the entire file is a mess
@lusty quest 526 line
Scroll down
I love being messy ¯\_(ツ)_/¯
And /shrug
this looks ok
Yeah
But try running C!hype
In my support server
It gives an error in the logs
@lusty quest do i temporarily add you to the project so you can see the logs?
i dont use glich and will not make a account there
also i dont think your message.guild.id line makes the error maybe something that uses it
This:
(can't color syntax on mobile)
db.add(`userXP_${guildID}_${userID}.xp`,Math.floor(Math.random() * 5));
@lusty quest
That gives error
With FUCKING STOP CHANGINF MY TEXT AUTO-CORRECT
guildID
Doesn't give error when declared but gives error when i use it
welcome to runtime errors
the code doesn't know what can error and what can't because it isn't running - it can't run the logic for it
syntax and compile errors are different because they're baked in rules
so any IDE can tell you whether your code follows those rules or not
trying to make a command where I can create a role
message.channel.send("Role is created")
let rolep = message.guild.roles.create({
name: "muted",
color: 'blue',
permissions: [],
position:1,
})
.then(console.log)
.catch(console.error);
message.member.roles.add(rolep);
Error:
(node:1080) UnhandledPromiseRejectionWarning: DiscordAPIError: Unknown Role
at RequestHandler.execute (/home/runner/Anti-Spam/node_modules/discord.js/src
someone an idea what is going on here?
you're adding a promise
not a role
anything that you need to create - that needs to interact with the API is a promise and needs to be handled accordingly
either by using await/async pattern or promise .then pattern
is it me or is the discord api acting weird?
hi
Have I missed something or aren't bots in the role.members property?
guys i have a question, how can i set the server numbers my bot is in, into the bot page?
ok
This:
(can't color syntax on mobile)db.add(`userXP_${guildID}_${userID}.xp`,Math.floor(Math.random() * 5));
Help
Bruh
Why can't i quote code block
Can anyone help me? I have a role with 5 members. When I'm getting that size on my main bot, it returns 5. When I am getting it on my test bot with some intents disabled, it returns 2. With all intents again it returns 5. How?
you can it just displays differently on other platforms because discord is discord and discord is inconsistent in every aspect you can imagine lol
Can anyone help me? I have a role with 5 members. When I'm getting that size on my main bot, it returns 5. When I am getting it on my test bot with some intents disabled, it returns 2. With all intents again it returns 5. How?
I now see it looks like it only counts members that are cached. But why?
I know that it is a promise, that is why I added the then() catch() but it didnt work 🤔 anyway, I have found a solution
thanks tho @earnest phoenix
.then executes when the promise resolves, the add method proceeds to add the promise without waiting for the promise to resolve
it's why async/await pattern is more preferred
I see, yeah, I have changed it to await later on, that was more or less the solution
I also had to add something else. Here the code:
let rolep = await message.guild.roles.create({
data: {
name: "muted",
color: "blue",
permissions: [],
position: 1
}
});
that is indeed correct, pangloss
yes and no. bots do not have access to the search endpoint like users do so you can't do that - however what you can do is spam the GET endpoint for messages until you reach the very beginning of the channel, this is a method that is very risky because you'll get ratelimited a fuckton of times and you might even get API banned, even if you succeed it can take hours to complete @sullen salmon
Cringe
huh?
@earnest phoenix can't you fetch messages until it doesn't return 100 anymore? Or is that the same?
yeah that's what i said
oh okay
that's spamming the endpoint
night (one of the lead discord api devs) said they had plans to make the search endpoint available for bots back in january but we still have no news on that
it's just kind of a thing you get used to
they couldn't care less about their bot developer community
hmm that's sad
Anybody knows why does this error happen on MongoDB?
Error: cyclic dependency detected
I do wonder how applications like Discord chat Exporter don't get ratelimited
When fetching all messages
don't use mongo so i can't tell you much, however cylic (or circular) dependency is when one thing depends on the other but that other thing depends on the first thing

e.g. class A needs B to construct, but class B needs class A to construct
anyone know how to secure a vps for bot hosting?
check pins
e.g. class A needs B to construct, but class B needs class A to construct
@earnest phoenix
think of it like the you need work experience meme
+help
403 is the forbidden error
you do not have permission to access whatever you're trying to access
considering this is from youtube - first try updating the libraries you use
if that doesn't work
the video is either private, copyright claimed, taken down or age restricted
nope, just ytdl
got it
How do I fix this? ;_;
Error [VOICE_CONNECTION_TIMEOUT]: Connection not established within 15 seconds.
at VoiceConnection.authenticateFailed (C:\Users\Administrator\Desktop\Team Thunder\node_modules\discord.js\src\client\voice\VoiceConnection.js:297:27)
at C:\Users\Administrator\Desktop\Team Thunder\node_modules\discord.js\src\client\voice\VoiceConnection.js:325:61
at Timeout.<anonymous> (C:\Users\Administrator\Desktop\Team Thunder\node_modules\discord.js\src\client\BaseClient.js:83:7)
at listOnTimeout (internal/timers.js:549:17)
at processTimers (internal/timers.js:492:7) {
[Symbol(code)]: 'VOICE_CONNECTION_TIMEOUT'
}
(node:4320) UnhandledPromiseRejectionWarning: Error [VOICE_CONNECTION_TIMEOUT]: Connection not established within 15 seconds.
at VoiceConnection.authenticateFailed (C:\Users\Administrator\Desktop\Team Thunder\node_modules\discord.js\src\client\voice\VoiceConnection.js:297:27)
at C:\Users\Administrator\Desktop\Team Thunder\node_modules\discord.js\src\client\voice\VoiceConnection.js:325:61
at Timeout.<anonymous> (C:\Users\Administrator\Desktop\Team Thunder\node_modules\discord.js\src\client\BaseClient.js:83:7)
at listOnTimeout (internal/timers.js:549:17)
at processTimers (internal/timers.js:492:7)
(node:4320) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:4320) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
I'm just wondering but are most bots coded in JavaScript? mine coded in BDscript
yeah, most bots are coded in djs
oh
since i dont have access to a pc i use my phone to code. should i switch to java?
is java harder?
I have two bluetooth keyboards
My mom wont let me use the pc because she says I stare at it too much.
ima try coding in java
It’s JS, not java
ok
unless you literally mean java
I kinda edited a command into my bot to ban me from a server I wasn't in anymore on mobile once

did he code in JS?
Its the stackoverflow guy
did he code in JS?
@pine raven yes
let commandName = args[0].toLowerCase();
fs.readdirSync("./commands/").forEach(dir => {
delete require.cache[require.resolve(`./commands/${dir}/${commandName}.js`)];
client.commands.delete(commandName);
const commandFile = require(`./commands/${dir}/${commandName}.js`);
client.commands.set(commandName, commandFile);
});```
How can I get right commandFile path??
I'm getting this error.
Who could share the code to find out the number of servers the bot is on?
Thz <3
And another question, if my bot is in Russian, can it be rejected?
Ok, thz ^•^
Do you think using a library is a good idea for a bot that will be used on multiple servers?
I use a lib
I have this issue idk what I need to do to fix it
How bot use emotes not be serwer
@earnest phoenix the bot has to be in the server, and it’s <:name:emojiid> or for animated <🅰️name:emojiid>
I have this issue idk what I need to do to fix it
@earnest phoenix that isn’t play.js is it?

Possibly
that’s index
I tried adding a play music command
And if didn’t work
So I removed it and now Idk what to do
yes
yes
@misty sigil how? (jda)
Hey, how can I fix this error?
Error [VOICE_CONNECTION_TIMEOUT]: Connection not established within 15 seconds.
at VoiceConnection.authenticateFailed (C:\Users\Administrator\Desktop\Team Thunder\node_modules\discord.js\src\client\voice\VoiceConnection.js:297:27)
at C:\Users\Administrator\Desktop\Team Thunder\node_modules\discord.js\src\client\voice\VoiceConnection.js:325:61
at Timeout.<anonymous> (C:\Users\Administrator\Desktop\Team Thunder\node_modules\discord.js\src\client\BaseClient.js:83:7)
at listOnTimeout (internal/timers.js:549:17)
at processTimers (internal/timers.js:492:7) {
[Symbol(code)]: 'VOICE_CONNECTION_TIMEOUT'
}
(node:2736) UnhandledPromiseRejectionWarning: Error [VOICE_CONNECTION_TIMEOUT]: Connection not established within 15 seconds.
at VoiceConnection.authenticateFailed (C:\Users\Administrator\Desktop\Team Thunder\node_modules\discord.js\src\client\voice\VoiceConnection.js:297:27)
at C:\Users\Administrator\Desktop\Team Thunder\node_modules\discord.js\src\client\voice\VoiceConnection.js:325:61
at Timeout.<anonymous> (C:\Users\Administrator\Desktop\Team Thunder\node_modules\discord.js\src\client\BaseClient.js:83:7)
at listOnTimeout (internal/timers.js:549:17)
at processTimers (internal/timers.js:492:7)
(node:2736) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:2736) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
I've had that error before, Give your bot more time to join the voice channel
Np
I use a lib
@misty sigil
quick.db is fine?
yea ig
Okey)
I had a problem that after a certain number of people, he cannot make top participants by the number of coins
all custom emojis need to be in the <id:name:> format
wait
i think it's the other way around
idk
yes
it is
the id is also located in the url of the emoji
right
discord filters out links now and keeps the embed
what's your code
how you get id
@earnest phoenix
I used the command to display the message content in the console, and that's how I used it. :)
you can right click and get the id/use the inspector
since discord is electron you can just do ctrl+shift+i
it'll pop up with chrome dev tools
if it's an animated emoji, add a before the first colon
the error is unrelated
I have this serverinfo command and it just seems to not be working the bot won’t respond and I’m not sure why it is
Can you be more specific @earnest phoenix
I’ll send the code
how to do
{mes_count} messgae has been deleted
message.channel.send('`\`\`js /n ${mes_count} message has been
deleted.`\`\`\').catch(WoW => {});
<a:name:id>
Surround it with < >
To send an emoji in chat do indeed need the <>
a is also only needed for animated emojis
yes
@golden condor thats the code on haste
Whoops I pinged the wrong person
tldr it's because the official client can detect things it needs to resolve faster (mentions, custom emojis etc.)
https://paste.awoo.rocks/omacobugiv.coffeescript
@golden condor and in the main js I put what I put for other commands but the others work and this one doesn’t
hello I'm doing user.tag to show someone's tag but it keeps saying undefined
let user = message.mentions.members.first() || message.guild.members.get(args[0])```
how user is defined ^
@earnest phoenix can you remove the {} around embed
this.guild.me.voice.setSelfMute(true)```Always returns false and dosent works
It didn’t work
How do you create a role, But if that role already exists do nothing? in discord.js
I cant find it on the docs
roles#create
message.channel.send(" ```js\n${mes_count} message has been deleted.``` ").catch(WoW => {});
please help how to make ${mes_count} see in here

Okay thanks flazepe
check if the role exist first by using roles.find()
I’m trying to type refresh into the cmd to stop the bot but it won’t let me type
Okay thank you so much flazepe
all good
hello I'm doing user.tag to show someone's tag but it keeps saying undefined
let user = message.mentions.members.first() || message.guild.members.get(args[0])```
how user is defined ^
@wispy viper
- Don't ask to ask
2. Don't dotpost
tag is on a user not a member
Np
or just ctrl + c in the terminal lmao
How do I find how many servers a user is in, For a userinfo command if my friend was in 11 servers it would say 11 servers on my embed/msg
you'll have to use oauth to get all of their guilds
so basically possible but a pain for user info command
sigh Okay thanks
you mean mutual servers?
@pale vessel
it is but not for a bot with a simple userinfo command
that would require a webserver for OAuth and the bot getting the user's guilds
O.o
Hello there, I am trying to create an npm package (using js) and I am trying to make it compatible with typescript, how would I be able to do this?
you code it in ts
add types and all
My bot is replying with the same thing twice and I’m not sure why it is anyone able to help
But I know some other packages (such as d.js) which do not use ts but can be used in ts
Okay then you add d.ts
.d.ts right?
What does @hardy spindlepes/node do in this situation
@earnest phoenix d.js?
@lusty quest yes
Like when I do a command like d!help it’s meant to reply once but it replies twice
And I definitely haven’t changed anything to make it do that
how did you login into the API? did you use client.login(token) or did you pass TOKEN: YourTorken in the Client Constructor?
you can just write it in js, you dont need to write it into d.ts or ts or anything if u dont want to, @golden condor
or did you have 2 instances running?
I'll write it in ts and compile it
@lusty quest I might have had 2 running by acccident
But idk how to make it so I only have 1
stop all excessive ones
did you pass the Token to your Client constructor and use client.login()?
I think I did
hi
^^ Not sure what this error means
@golden condor you need to put that thing insidepublic:inside the class, thats what statically written/oop languages means
Nah it was my fault, used require instead of import lol
@ornate flax spoonfeeding is not allowed
@summer torrent okay
my bot gives me this error
sqlMessage: "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'prefix VALUES 'vtb!' WHERE guildID = '264445053596991498'' at line 1",
client.sql.query(`INSERT INTO guildconfig prefix VALUES ? WHERE guildID = ?`, [newprefix, message.guild.id], async function (error, results, fields) {
if(error) {console.log(error);return message.channel.send("Unable to set new prefix, sorry about that!")}
...
})```
remove quotes
guildconfig prefix
Should there be a space in there?
The values after VALUES should usually be in parentheses.
Also is it normal to supply a WHERE clause in an INSERT INTO statement.
yes
yes guildconfig is a table
prefix is the table value
i tried it with () around the prefix and ? parts
but the same error happens
households some people put their bots on another server fln, or how does one use that command, how does it save the bot to save his own diary? (who used it, etc.)
@ornate flax what
I mean, when I try my own SQL statement, it complains about the WHERE clause. Unless the sql is behaving differently depending on what database you're using, I don't see why it should be there when you're trying to insert new data.
@ornate flax what
@honest perch why, what happened?
i dont understand what you just said lmao
good 😄
i add it to make sure it only saves to that guilds data set because they are guild by guild prefixes
Would the guild (id) not have its own table value?
i removed the where ? thing and now it doesnt set the prefix it keeps it the same
Then you were probably looking for UPDATE instead of INSERT INTO
U tried
😔
mongo easier
Update goes like UPDATE table_name SET field1 = new-value1, field2 = new-value2 [WHERE Clause]
this is why i dont run my bots on my home wifi
give me ur vps's
i dont pay anything for how i host mine
You're trying to send an empty message
Would be useful if you send the code you're using
and what command are you getting this on
so im using git auto deploy for my bot, and it seems to work just fine. however, every time i restart the bot thanks to it, i got this error: https://lumap.is-inside.me/Z6dB6o73.png It doesnt afect anything, because the pull has already been done and pm2 automaticly restarts it, but how do i get rid out of this?
@earnest phoenix I assume it's in this line: return message.channel.send(err);, it's the only line that might be empty as far as I see
what does subject rely on? @tight plinth
but this is a interestening way for updating stuff maybe i make me something like this too
So delete it?
@earnest phoenix Or just put"Error: ${err}"there first to check if that's the cause
How do you fix the Error: StatusCodeError: 403 - "" error?
did you cache members?
ok so i have one BIG problem with git auto deploy: git doesnt seems to send the secret defined here https://lumap.is-inside.me/tBp5aXvJ.png
so i can't see if someome manually posts a request to it or if its me
rip
Need help, my console is printing this everytime I run a command.
@earnest phoenix because you are sending a message everytime
lol
did you cache members?
@lusty quest yup
so you use the client option right?
if(command === "stealemoji"){
if (!msg.member.hasPermission(`MANAGE_EMOJIS`)) {
return msg.channel.send(`You Don't Have Permission To Use This Command! Manage Emojis`)
}
const emoji = args[1];
if (!emoji) return msg.channel.send(`Please Give Me A Emoji!`);
let customemoji = Discord.Util.parseEmoji(emoji);
const Color = `RANDOM`;
const Link = `${args[1]}`;
const name = args.slice(1).join(" ");
msg.guild.emojis.create(
`${Link}`,
`${name || `${customemoji.name}`}` );
const Added = new Discord.MessageEmbed()
.setTitle(`Emoji Added`)
.setColor(`${Color}`)
.setDescription(
`Emoji Has Been Added! | Name : ${name || `${customemoji.name}`} | Preview : [Click Me](${Link})`
);
return msg.channel.send(Added);
let CheckEmoji = parse(emoji, { assetType: "png" });
if (!CheckEmoji[1])
return msg.channel.send(`Please Give Me A Valid Emoji!`);
msg.channel.send(
`You Can Use Normal Emoji Without Adding In Server!`
);
}```
my code
no error
but output
Error [VOICE_CONNECTION_TIMEOUT]: Connection not established within 15 seconds.
at VoiceConnection.authenticateFailed (C:\Users\Administrator\Desktop\Team Thunder\node_modules\discord.js\src\client\voice\VoiceConnection.js:297:27)
at C:\Users\Administrator\Desktop\Team Thunder\node_modules\discord.js\src\client\voice\VoiceConnection.js:325:61
at Timeout.<anonymous> (C:\Users\Administrator\Desktop\Team Thunder\node_modules\discord.js\src\client\BaseClient.js:83:7)
at listOnTimeout (internal/timers.js:549:17)
at processTimers (internal/timers.js:492:7) {
[Symbol(code)]: 'VOICE_CONNECTION_TIMEOUT'
}
(node:4236) UnhandledPromiseRejectionWarning: Error [VOICE_CONNECTION_TIMEOUT]: Connection not established within 15 seconds.
at VoiceConnection.authenticateFailed (C:\Users\Administrator\Desktop\Team Thunder\node_modules\discord.js\src\client\voice\VoiceConnection.js:297:27)
at C:\Users\Administrator\Desktop\Team Thunder\node_modules\discord.js\src\client\voice\VoiceConnection.js:325:61
at Timeout.<anonymous> (C:\Users\Administrator\Desktop\Team Thunder\node_modules\discord.js\src\client\BaseClient.js:83:7)
at listOnTimeout (internal/timers.js:549:17)
at processTimers (internal/timers.js:492:7)
(node:4236) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
My error
your network sucks @swift void
@summer torrent and me?
@summer torrent probably
@delicate shore no, what is the error
do you have error handler?
no
like <Client>.on("error", console.error)
yes
process.on("unhandledRejection", console.error) is good to habe too
^
hey, is there a way to make a on_reaction_add stop when the user react once
and I can't use wait for
How can I fix the StatusCodeError 403
when using a youtube api
started occuring again
@swift void means probably you have used your limit
um
but I've regenerated tonsa times @restive furnace
but I've regenerated tonsa times @restive furnace
@swift void regen doesnt do anything, just do ip rotating and web scraping, thats what big bots do
@restive furnace how do I do that
i dont know, never did, one of my friends just told me so. probably better to ask from someone else.
where do u host
i have bupassed t
many times
because i use glitch
so i just duplicate project
and it generates a new vps
he probably uses a real vps
and no. theres no way 1 project per vps.
its around 1000 projects per vps
@swift void did you use a free hoster?
ok
yeah @lusty quest
a remote desktop connection
use a vpn
you can forget running a music bot on Glitch or heroku
eeee
they dont offer enought power for this
i wasnt talking to you if you havent noticed it
k
I needa fix this 403 error
amazon AWS?
yepppp
will work
heroku
maybe ratelimited?
this wont reset the limit
how do I reset the limit + wat
oh dear
glitch banned ping services ....
glitch is shit
no, heroku is shittier
glitch banned ping services ....
@swift void i pay 10 dollar per month
for premium
yeh
if you got a credit card get the 1 free year from AWS
what you get for the 10$?
I am using the free year from AWS
what you get for the 10$?
@lusty quest no rate limiting on glitch
200% more storage and CPU and 24*7 hosting
wait
and support a bigger bot

which key is limited
idk how long but you can calculate with 12-24 hours
youtube API?
yeah
oh lord
i left youtube API because evn after 2 days it's limit was not reset
oof
make a shedule
tell me your secrets
it's npm package
npm i YT_search?
@delicate shore there is still a ratelimit
a ratelimit? oh fuck
@delicate shore there is still a ratelimit
@lusty quest no
only one rate limit
Of discord
just the guy who made the package calls the api
no
You can use distube package too if you use discord.js v12
a ratelimit? oh fuck
@swift void NO!
no the pack has to call the YT api. scraping YT is forbidden by the YT TOS
-YT_search
i have not got any rate limit since 1.5 months
no the api has to call the YT api. scraping YT is forbidden by the YT TOS
@lusty quest noo
that is something else
ok pgamerx, how do I use YT_search

YT_search has to call the YT API. there is no other way to get stuff from YT on a legal base otherwise
hey, at least I won't have to worry about api keys
I need the search command damnnit
const yts = require( 'yt-search' )
yts( 'superman theme', function ( err, r ) {
const videos = r.videos
const playlists = r.playlists || r.lists
const channels = r.channels || r.accounts
console.log( videos[ 0 ] )
} )
no wait
or 0
that's yts
interestening. it really doesnt use the Google API it uses a Bot for making Searchquerys
probably a grey area
now how do I use this module
that
gonna read
cheerio
const yts = require( 'yt-search' )
yts( 'superman theme', function ( err, r ) {
if ( err ) throw err
const videos = r.videos
videos.forEach( function ( v ) {
const views = String( v.views ).padStart( 10, ' ' )
console.log( `${ views } | ${ v.title } (${ v.timestamp }) | ${ v.author.name }` )
} )
} )
// promises also supported
// const r = await yts( 'superman theme' )
yes, i did npm i cheerio
do play first
https://www.npmjs.com/package/simple-youtube-api its also really easy to use
you got it
if you want to use it mainly for music lavalink is also a good thing (Most larger Music bots use it)
I use ffmpeg
e
e
f
i tried everything
lol
to be alive
e
iirc lavalink needs a lavalink server or something like this to work
i just have basic
dang
music commands
iirc lavalink needs a lavalink server or something like this to work
@lusty quest yes
watch code lyon
on yt
for better
understanding
or if you gonna be a copy paster
just go https://www.google.com
Search the world's information, including webpages, images, videos and more. Google has many special features to help you find exactly what you're looking for.
and type Lavbalink music bot github
download the code
and enter your id and token and prefix and it should work
i guess its time to learn Go-lang
testing
funnybug is funnnnnny.
this gives me flashbacks to a bug ive had. my bot had around 10 minutes delay between command use and execution
lol, thats slooow
the bug isnt the speed of it, the bug is that hint
best fetch a calculator, lol
only bcs a api decided to return 1 million results
the answer was like 15 billion dollars, it was too big for a 32 bit integer 
rip
the next hint is like....
that was the giveaway for me, i wasnt playing at the time, this was in someones pins lol
well atleast you found a bug
yea
i know a guy who try to break Discordbots for fun, he actually discovered a few bugs in my bots and i was able to fix them before i added them to dbl
then you can squash it
so basically im using git auto deploy for my bot. everything works, except one thing: if i DON'T have an instance of vscode opened connected to the vps via ssh, this happens: https://lumap.is-inside.me/POJCgKRS.png
i added remote start/stop to the bot today, which means that i can add dashboard functionality to show running games of trivia, start new rounds, and end existing rounds... im thinking that will be nice for non-technical users, but for technical users im going to add per-channel webhooks
so someone who knows that super secret webhook for the channel can call it with curl to start and stop a game
time to hammer my brain now with Golang
im thinking of tying that into stuff for e.g. games that start and stop at specific calender times/dates
you think anyone would directly use webhooks to start and stop trivia games?
can someone help me please ive been trying to fix this issue for like 3 hours and i cant fix it
i'm about to explode
i guess only 3% of the Discord users know how to use webhooks
it looks like git is trying to use vs.code as authentication @tight plinth
check its .gitconfig
hmm
its trying to auth thru a pipe that vs.code is creating while its running
/run/user/1004/vscode-git-<hex>.sock .... its a unix socket
my .gitconfig in my user folder: https://lumap.is-inside.me/zw1cU1z4.png
its part of remote development it seems
https://code.visualstudio.com/docs/remote/ssh this perhaps?
i think its a issue with the git shell integration for vscode
lemme check
ok i changed my git config so it has my password, now lemme retry
aaand it works!
thanks you so much brain
u rly have a big brain 
big brain brain
no problem @tight plinth 😄
Heya,
Does anyone know how i make this time: 2020-07-20T19:28:09.708Z
In Normal Time?
(in html js)
You could split it
date.split("T"), then you have ["2020-07-20", "19:28:09.708Z"]
Or, work with new Date( Date.parse("2020-07-20T19:28:09.708Z"))
(in html js)
@sterile minnow Use Date method, such as toTimeString(), toUTCString(), toLocaleString()
i need some help
so im tying to make the bot page have a colored background
and im just not good enough at CSS to know how to do this
can someone pls help?
i found this <div style="background-image: url('img_girl.jpg');">
ty
K
mee6 :>
:.
no
<div style="background-image: url('img url');"> isnt working
You can't post invite here :v
@silver spear your dm's are closed
mr. sloth, i can
@silver spear dont give it for free lmao
no, mine arent
Because the image is not in the assets @silver spear
@silver spear ys
@misty sigil itll take me 5 mins
@indigo ocean stop it or i call a moderator
@misty sigil itll take me 5 mins
@silver spear the hosting costs
@misty sigil You have access to Luca?
wut no
Oh, idk because your vsc workspace is called luca
ahh
Hey is any body here know about heroku? i have some questions about it...(if u dont mind join general voice chat)
Ok, I know a bit
@misty sigil do u mind if u join voice channel? i have some questions about it
Heroku restart dyno after 24h, so it's not recommended
@misty sigil Luca bot has shit source imo
no idea personally i've never really used package.json on heroku
Maybe I can help :v you can chat here
no idea sorry
need some help actuallyy
i've spent days
on this now
<div style="background-image: url('img_girl.jpg');">
i have that
but when i put in desc of bot page
it doesnt work
whats wrong?
Because https://top.gg/img_girl.jpg doesn't exist?
So how to I use reaction roles for my bot? Like
<div style="background-image: url('img_girl.jpg');">
@silver spear Maybe something above it
<div style="background-image: url('https://media.discordapp.net/attachments/272764566411149314/735147641029132338/1568911350654_thumb-1920-1015834.jpg?width=844&height=752');"
still didnt work...
@muted venture npm install --global windows-build-tools
<div style="background-image: url('https://media.discordapp.net/attachments/272764566411149314/735147641029132338/1568911350654_thumb-1920-1015834.jpg')">
ok thx
Why would you have a image as background in the first place?
it didnt work netail
because bots like midori do
lemme send u link, https://top.gg/bot/734766496668188753
just no background ...
You're editing it, I can't see it

