#development
1 messages ยท Page 619 of 1
yeah idk either lol
lmao
I forgot that detail Xd
mistois can u help me
DBL api server post?
@slender thistle yeo
what lib
js
Use dblapi.js
whats that is that the whole bot hingy
npm package, it has autopost
is that a third party discord.js thingy
but i already have my bot running up on discord.js
You are not modifying your already running bot by using dblapi.js
im getting confused
dblapi.js is literally just a package that you can implement into your bot
Do you know what npm is
so i can ust add this in on ready function dbl.on('posted', () => { console.log('Server count posted!'); })
huh?
@slender thistle ^^^^?
event i meant
If you define dbl and implement it into your bot, yes
got it
@gilded plank botinfo @molten gyro
My bot is hitting 2400 soon, should I shard? would anyone have sharding tutorial for discord js?
@earnest phoenix Discord refuses to connect your bot once you go above 2500 without shards
the usually recommended amount is 1000/shard iirc
I know..sharding looks really tedious though
Yes it is a bit
But it's more tedious once you've hit 2500 and your bot refuses to connect
its actually not even too hard to set up from my experience
@simple silo ```bash
$ npm i express
you dont need the $, it works anywhere with npm installed
Yo whats the best heroku alternative idc if its paid
a vps
What bot can auto-delete all messages in a channel except for 1?
I want to make a self-role channel that keeps just one pinned message and deletes all the [.iam role] and any other messages
you can set YAGPDB to delete its messages and your messages that are used to command it immediately
thats what we do
In need of some advice. How would you deal with your bot throwing missing permission errors in other servers?
Noticing a trend of users adding the bot, trying a command and when nothing happens they just kick it. But I know they've disabled message permissions or something that prevents the bot from speaking
.catch
Feels annoying to lose a potential server of users just because the owner has no clue how discord and rรดle management works
@woeful flare I can delete successful commands right now, but not other text messages
you can set up a custom command with that bot so it automatically does something every so many minutes or even seconds, and then combine that with a clean command and your set to go, which it also has.
@sly swift
youll set up a timed trigger for 1 second to activate the clean command at such intervals.
@pliant needle I literally set up sharding before I even developed the bots commands
Well Ik that but where do we customize it?
on the long description
in long desc
Oh we can do that
let sug = new Discord.RichEmbed()
.setColor("GREEN")
.setTitle("๐ก โข Nouvelle suggestion")
.setDescription(`${suggestion}`)
bot.channels.get("580064675996237864").send(sug);
sug.react("โ
").then(message.react("โ"))
I have a doubt about the sug.react
its will work?
no
of course not
bot.channels.get("580064675996237864").send(sug).then(msg => {
msg.react("")
})```
Can anyone remind me how to display a channel name in an embed (d.js) it's slipped my mind
That not how I wanted to do it but thanks, I've got it now @earnest phoenix
u welcome
@earnest phoenix What kind of stats?
I don't know how to apologize.
I do not know how to do the stats fortnite
you can
Look for a fortnite stats API, then you would query that
I used the fortnite public api, can we link it?
Idk if thats the best one, but you made me type fortnite into my search bar, so I will never forgive you
You could use the npm fortnite package
Any example of self assignable role
wrong channel and please dont repost your question in 3 seperate channels
seperate? Did you mean separate?
const dbl = new DBL("", { webhookPort: , webhookAuth: '' });
dbl.webhook.on('ready', hook => {
console.log(`Webhook running at http://${hook.hostname}:${hook.port}${hook.path}`);
});
dbl.webhook.on('vote', vote => {
console.log(`User with ID ${vote.user} just voted!`);
});```
what am I doing wrong
whenever anyone votes i get this message
ffs no
see now youre getting muted
ooof too long lemme get screenshot
imagine making discord bots in 2019
i get that error message
what im i doing wrong
const dbl = new DBL("", { webhookPort: , webhookAuth: '' });
dbl.webhook.on('ready', hook => {
console.log(`Webhook running at http://${hook.hostname}:${hook.port}${hook.path}`);
});
dbl.webhook.on('vote', vote => {
console.log(`User with ID ${vote.user} just voted!`);
});```
there is no catch block whatever that is
Empty string as token inb4
youa rent even getting it from your code
getting what?
...
hmm
oh wait wrong error message
heres the one
it says my webhook is running but whenever someone votes i just get that error
help anyone?
so im creating a webhook like this:
const hook = message.channel.createWebhook("webhook name");```
and im trying to send messages with it using this
```JAVASCRIPT
hook.send("hello");```
but console is saying `hook.send` is not a function
i am so braindead rn i have no idea what to do
you need .createWebhook().then(webhook => webhook.send())
what?
npm i express
2 fast 4 u xyber
@simple silo delete the package in node_modules
Can any of you read lol
And missing permissions as well
Delete "express" in node modules
bot starting is error
@noble halo just read docs about setActivity
it may be that you don't have permissions
@noble halo
?
Look up
You can dl package without npm on glitch
@noble halo client.user.setActivity('I like potatoes', { type: 'WATCHING' });
That
Put your activity in string
And you can change the type "WATCHING, PLAYING, STREAMING"
ฤฑ make but the not work
@noble halo what is the error
client.user.setActivity('YouTube', { type: 'WATCHING' });
bot error while opening
Dude
Ur using set game
Just remplace setGame by setActivity
Its deprecated
i using
client.user.setActivity('YouTube', { type: 'WATCHING' });
Yeah
Delete setGame
Maybe ur not saving
Do ctrl+h -> setGame - > setActivity
okey
And dont forgot to save
still same
Do you have delete setGame?
send ur code
ur code?
your code
Invite Others to Edit code?
No just send the part where it says is the error
why don't you send a pic of your code?
?
Make a error
what?
Same
send a pic of your entire code
Without token :)
its good @noble halo
@simple silo wait, so, you're installing express through glitch?
oooooh
you can't do that
i think glitch has a module for install package without npm
just install the dependency anywhere else and copy the thing in the package.json
not the whole thing tho
How do I solve the error? (missing permission) @earnest phoenix
@delicate zephyr hawt
i read
Missing permission
@noble halo if(!message.guild.me.hasPermission('CREATE_CHANNEL')) return;
Line 216
i think is that
lol idk why but i named my bot into Sireno lol
How can i make multiple prefixes, i tried to make it but i wasnt very successful
&stats
& is the only prefix
I meed it to be a mention too
Like this
@earnest phoenix stats
What type of music
No i dont, it was my first project but it uses alot resources and i cant keep it up
its good @noble halo
depends, I store each guilds prefixes in a mysql db table. Then when a message is posted in any server i pull that servers settings and cache them. On each message from that guild I check against the prefixes defined in the settings
thank you @earnest phoenix
np
error is 'Manage Channel' permission
I mean i dont need customizable prefixes right now @scarlet phoenix, i just need to know how i can use multiple prefixes at the same time
what ? @noble halo
sorry
thank you again
Same thing, just skip pulling the settings
if matches prefix1 or prefix2:
dostuff()
Basically what OR was made for
@noble halo np ;)
Fairly trivial
I never used or ๐ wow
I will check it out
For now im not on pc
I used || or && most of the time
what library are you using for your bot?
Js
explains much
Thanks
you can use ||, or
Oh so i dont need || to specify "or"
Okay thanks
||, or = or
&& = and
Yes i know i didnt know we could use text
Okay
Now what
Write dbl css github
On google
@cold canyon
CSS for customizing bot pages on discordbots.org. Contribute to advaith1/dbl-css development by creating an account on GitHub.
i was just looking at that
Hey, for anyone wondering, you can change the text color on the report and support server button with this code:
color: (hex color code here) !important;
transform: translateY(0px);
}```
You can also change the text color of the bot name:
color: (hex color code here);
}```
I wrote that
I figured it out
With a little more advanced code, you can add a colored border around the bot's avatar:
height: 100%;
border: 4px rgba(rgba color sequence) solid;
border-radius: 50%;
}```
Ohh nice
const dbl = new DBL("", { webhookPort: , webhookAuth: '' });
dbl.webhook.on('ready', hook => {
console.log(`Webhook running at http://${hook.hostname}:${hook.port}${hook.path}`);
});
dbl.webhook.on('vote', vote => {
console.log(`User with ID ${vote.user} just voted!`);
});```
Itโs saying Thers an API error and itโs not authorized
did you ever put your api token?
it would be the discordbots.org token
Hmmm thatโs th one I put
Wait
I found th issue
I never set it up on my bot page omg
anyone here knows about sharding?
What library are you using?
discord.js
Follow this tutorial: https://github.com/discordjs/guide/tree/master/guide/sharding
internal sharding or regular?
i know about this, i have a question it didn't answer
Okay, tell us ;p
i have 2 files, shards.js and bot.js, you can probably know what each does, but how do i get the sharded token in bot.js?
client.token
so client.token already has token in it after sharded? so no need client.login?
that's what i wanted to know, thanks
it didn't work, i had to use client.login with a specified token to get the bot to work, but i wanted to know if after sharding is there a variable that contains the token in bot.js
client.settings = {
token: client.token,
id: client.user.id,
djsversion: require("discord.js").version
}``` if you put this in your `ready.js`, I assume it'll work so you can get token with `client.settings["token"]` in anywhere you have the client variable
Hey Can you help Me
Hello
You need help?
Your brief description is too long, you need to make it shorter. And You need to make the long description longer
Ok , Thk
Np
bruh
403 is the forbiddon error code
you tried accessing a certain part of the site and it was not allowed
@earnest phoenix are you trying to create a bot or to add one to the site
bc yesterday someone thought that this was the site to create the actual bot
The link does not work
ofc it doesn't work
the bot still needs to be approved
just wait
the process can take up to 2 weeks
what
Ok , thk
np
Hey can someone tell me on how to make a command send a message to you in dms? Iโm using python for my bot!
oof
idk anything about python
but I've seen python bots
so I guess it's something like
message.author.send()
or idk
@copper wraith you need a user object (message.author), then just call send
@copper cradle if you don't know, then don't respond... this is common sense
Ok Thk , Gaes
np
,Give me a link ServerSupport you
there's no support server
Mmm. Ok
so i am creating a webhook and i give a url for the profile picture but the profile picture stays default and doesn't use the one i provide
does anyone know why this could be happening?
its "avatar_url"
oof
Cant you use a file?
@hasty hedge
what
there is logging tag right ?
ow
give a role to the bot
Can somebody smert plz explain what my error is telling me
I started getting this error after setting up the DBL api webhook
? This is for the webhook that notifies me when someone votes
if missing permissions that mean that the bot no have permissions
My bot is set to require admin...
set the bot role to the top ?
I canโt do that for every server the bot is on
Dont most
No
? Every one Iโve ever used does lol. Either that or it requires 1,000,000 perms so it practically has admin

ayy my iframe doesnt work but the code is right help
How do you remove this
I'm putting in it my bot support server and it's annoying
I've seen other bot servers without that
putting < > around the link disables any embeds that it would generate
Example:
with < >: https://discordbots.org/
without < >: https://discordbots.org/

The embed is still there 
Hey 
huum
without < >: https://discordbots.org/
||without < >:|| https://discordbots.org/
ุWhat? @earnest phoenix
leash
how to set streaming here
```
const activities_list = [
"v2.0",
${bot.users.size} users use me,
${bot.guilds.size} servers,
];
setInterval(() => {
const index = Math.floor(Math.random() * (activities_list.length - 1) + 1); // generates a random number between 1 and the length of the activities array list (in this case 5).
bot.user.setActivity(activities_list[index]); // sets bot's activities to one of the phrases in the arraylist.
}, 5000); // Runs this every 10 seconds.
});```
.setActivity('snails', { type: "STREAMING", url: "your twitch channel url"});
I'm not sure if it was like that
url is important
What is the best way to bring in a variable into a bot command, I am trying to make a simple bot that you can call with !weather-NAMEOFCITY and then call a weather API to return the result
i started with the example online which replies to !ping with pong
Also is there documentation specific to bot development? i am reading through this atm https://discordapp.com/developers/docs
Integrate your service with Discord โ whether it's a bot or a game or your whatever you wildest imagination can come up with.
which library are you using?
if discord.js, then there's https://discord.js.org/#/
if discord.py, then there's https://discordpy.readthedocs.io/en/latest/
Javascript
then first link i've sent, but it's discord.js not javascript for library
Anyone elses bot randomly reconnect to Discord's API
Or when their bots playing music it randomly disconnects without an error
yeah
Been happening quite a bit recently
The bot disconnecting from voice channels is the most annoying
yeah
I set up a webhook to listen for votes but whenever someone votes I just get this error
have you read the error @grizzled spruce
Nope Iโm still getting the error
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
how do you get a webhook's id & token? i cant even find it in the settings for the webhook
js
One message removed from a suspended account.
One message removed from a suspended account.
@earnest phoenix webhook's id and token are visible directly in the webhook URL, which are the last 2 arguments like in the cyber's example
nice
thanks
can i do webhook.id to get the id?
thatโs what it seems like in the docs
How can I auto role bot a different role and member different?
With filter?
Will it work it filter
Getting the webhook id like that only works if you already have the webhook object defined
I hate when people Define Discord in every command when using a command handler
why can't they just pass the god damn thing
๐ณ
client.channels.get("580011269780799541").setName(`Member Count : ${guild.members.filter(member => !member.user.bot).size}`, `voice`) }, 1 * 5000);
bruh
Sorry
what
Wrong code
lol
It work fine
then
const embed = new RichEmbed()
.setAuthor(message.author.username, message.author.displayAvatarURL)
.addField("Server Name", message.guild.name)
.addField("Server ID", message.guild.id)
.addField("Owner Name", message.guild.owner.user.tag)
.addField("Owner ID", message.guild.ownerID)
.addField("Server Region", message.guild.region)
.addField("Server Creation", message.guild.createdAt)
.addField("Members", message.guild.memberCount)
.addField("Channels", message.guild.channels.size)
.addField("Emotes", message.guild.emojis.map(e=>e.toString()).join(", "))
.setColor(settings.embed.DEFAULT)
.setFooter(settings.bot.name + " " + settings.bot.version, client.avatarURL)
Why does this error in guilds where the bot doesn't have proper perms?
(here for example)
because... the bot doesnt have proper permissions... so it errors...
@mossy vine It can send message though and other bots send the same kind of embed
I'm wondering what the specific issue is
nvm got it
const emotes = message.guild.emojis.map(e=>e.toString()).join(", ")
if (message.guild.emojis.size < 1) {
emotes = "None"
}
Is this going to properly check if there are no emojis in the server?
-bots @peak fractal
@reef moat
@gritty harbor
how can i set var that defind in global in function
and also set to global
EX
function setvar() {
something = "newthing";
}
output(something);```
but i test it , something become undefine
- there's no reason to use var there
- the function is never called
Lol
what's the difference between a bot token and a bearer token?
hm ok
alright, but now I have another issue
I managed to send a message and delete the message, but for some reason I can't bulk delete messages
>>> r = requests.post('https://discordapp.com/api/channels/420467083323768833/messages/bulk-delete', headers = headers, data = {'messages': [580422554456686592, 580422706009210880, 580422729853960192]})
>>> r
<Response [400]>
>>> r = requests.post('https://discordapp.com/api/channels/420467083323768833/messages/bulk-delete', headers = headers, data = {'messages': ['580422554456686592', '580422706009210880', '580422729853960192']})
>>> r
<Response [400]>
and I can't find the issue, if there is one like a typo
My guess is your body is malformed
Idk for sure, but the 400 would point that way
Or one or more of the IDs cant be deleted for whatever reason
those are all messages sent today and by the client itself
in discord docs it says that it expects the messages parameter to include an array of ids
ยฏ_(ใ)_/ยฏ
why this won't work?
"token" : "(censored)",
"owner" : "huz17#4371",
"joincmd" : "no",
"login" : "login",
"commands" : {
"queue" : "no",
"volumen" : "no",
"stop" : "yes"
}
}```
the token is there, but i don't want, that somone see it7
do u get an error in the console?
Incorrect login details?
throw err;
^
SyntaxError: /app/config.json: Unexpected token : in JSON at position 108
at JSON.parse (<anonymous>)
at Object.Module._extensions..json (internal/modules/cjs/loader.js:720:27)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
at Function.Module._load (internal/modules/cjs/loader.js:531:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.<anonymous> (/app/bottot.js:17:16)
at Module._compile (internal/modules/cjs/loader.js:701:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
internal/modules/cjs/loader.js:723
throw err;
^
SyntaxError: /app/config.json: Unexpected token : in JSON at position 108
at JSON.parse (<anonymous>)
at Object.Module._extensions..json (internal/modules/cjs/loader.js:720:27)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
at Function.Module._load (internal/modules/cjs/loader.js:531:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.<anonymous> (/app/bottot.js:17:16)
at Module._compile (internal/modules/cjs/loader.js:701:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)``` i host it over glitch most time
oops i send it more than one time
<!-- It should work. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Why doesnโt that i frame work
lemme see
@copper cradle any ideas
Why is my border inside the image and not around it?
.img {
margin-top: 25px;
margin-left: 25px;
width: 450px;
height: 450px;
border-width: 5px;
border-color: #000000;
border-style: solid;
border-radius: 250px;
} ```
<body>
<div class="profiles">
<img class="img" src="https://i.imgur.com/X2XG1tU.png">
</div>
</body>
</html>```
What is causing the problem?
=m p
I need some help with adding a catch block to my code because this server doesn't let bots have perms..So I am consistantly getting my CMD/Console log filled with DiscordAPIError Missing Permissions warnings/errors. and yes I am new to coding and every website I look at for documentaion doesn't help me.
.send().catch(e => {})
Where in my code do I put that is my 2nd problem
on a method that returns a promise
Thanks
-help
Hello ๐ฏโโฐ๐ฅ๐ช๐ฆ๐โ!
Need help? Get more help and information here: https://discord.gg/pFPrbyq
Some FAQ:
+ Does this bot/website have a bump function?
No, Discord Server List does not support any bumping functions.
``````diff
+ My image|member count|emojis|name wont update?
Try updating your server on the website.
Go here (https://discordbots.org/servers/264445053596991498/edit) to edit Discord Bot List.
This bot does not have any other commands yet!
Ping whichever mod muted ur bot
@modern sable
alright thanks
Hello, does anyone of you know, how to set a background color for here? my bot has grey, this one is blue, and how to set those words?
i think it's automatically applied, you can't change it
how did that guy get the blue background
it has to be possible somehow appearnetly?
and what you have to do, to get it automatically applied? ๐
normal bots are all grey
set the playing status
@bitter sundial This just showed up in #logs (I didn't want to ping and annoy website moderators btw)
i dmmed marco about it
Thx
my console log is still getting spammed with the DiscordAPIError missing permissions error and warnings. even after adding
var promise1 = new Promise(function(resolve, reject) {
throw '';
});
promise1.catch(function(error) {
console.log(error);
});
// expected output:
to my code
It's an anti-spam bot that doesn't have permissons here and it's flooding my console log with errors and warnings
btw
oof
using discord-anti-spam npm
just add this sv as an exception
in the command handler
if (message.guild.id === 'this server's id') return;
and then the bot will ignore this server
I'll give it a try
One problem
Guys
I don't have different files with my bots commands in it
I cannot use fs
I write everything right, my console sees commands in file, but they dont get triggered
i even copy-pasted the discord's tutorial of it
lmfao
but im fine with current
but making it modular will make my code look clear
@copper cradle
I'll give it a try. I am sorry that I am not a super coder like evryone else here.. I am still learning.
I have 0 knowledge about js, but a fair knowledge for py
I have done some research and it isn't a message event that is causing the Missing Permissions error/warnings.. So I can exactly add if (message.guild.id === 'this server's id') return; to the beginning of a message event
the only message events that I have are kick, ban, ping, invite, help and vote
@modern sable Unban Sunny#9672, he/she didn't do anything
Sry if this is the wrong chat
kinda suspicious don't you think
appeals are usually done by sending a ban appeal to appeals@discordbots.org
no and Sendmessage async
try {
await user.SendMessageAsync(msg);
} catch (Exception e) {
...
}
you can call SendMessageAsync on the user directly
oh really?
yes
i figured it out
@earnest phoenix don't worry
Can't create an youtube api key, have anyone the same pblm?
Noo
https://developers.google.com/youtube/v3/getting-started
this should help
Oof.
also I don't speak that language.
I speak French kinda but not well enough to understand that
An error occurred while loading /apis/api/youtube.googleapis.com/credentials?project=platinum-analog-241302. Try Again.
Try Again.
It's the same every time I go on ID for trying to get the key
Honestly idk
Maybe b/c ur ISP, workplace, school, or government censors your internet access
^
@trim swallow that requires a backend language
oh
so my bot randomly turned off like 5 hours ago, randomly. I havent updated it in like 2 months
I've been trying to fix it but nothing is working
I already regened the token
If you want some way to authenticate a user, and it doesn't have to be an email-based login form, you can implement OAuth, which is generally much easier and doesn't require a backend language @trim swallow
Like the code starts, but it cant connect. No errors either
@amber fractal what lib/lang
Try this... js const client = new Discord.Client(); client.login().then(() => console.log("Connected!"));
Nope, but it still logs the dblapi stuff
Show code
Let me try restarting the vps first
lmao go ahead
Like I said I havent updated it since I moved to master
Well I changed all my code when I switched
Lmao
Yeah, not even sentry has anything
which is just the error logger that sends to my phone if there's errors
Yeah ik
Are u sure ur not "suppressing" any errors?
Like doing smth similar to this so that the errors don't show upjs process.on("unhandledRejection", () => {})
No, even if I had that it'd go to sentry
ok
Restarting the vps did nothing gimme a sec
Is there a GitHub repo or smth that I could look at?
Yep take ur time
I deleted quite a bit, but left what should be important https://hastebin.com/rovapilesa.js
and this is the only stuff that's logged https://images.is-just-a.dev/36.png
And nothing on sentry https://images.is-just-a.dev/37.png
OMG ur alive @quartz kindle
This is the dude I was getting confused with u @weak parrot
Nah still didnt connect
const Discord = require('discord.js');
const bot = new Discord.Client({shardCount: 'auto'});
const fs = require('fs');
var privates = JSON.parse(fs.readFileSync("../private.json", "utf8"))
bot.login(privates.pt).then(() => {console.log('connected')});
But I just havent updated it in a while so idk why it'd just come up now
Lmao why not just require() instead of JSON.parse(readdirSync())
I havent updated it in 2 months, that part has been there for 6 months
yeah
I have no idea how to use curl :P
What about just node-fetch or https
Well I know how to use those
how many guilds is your bot in?
819
remove the shard auto
^
Sharding is only necessary after like 2k guilds
(Mandatory after 2.5k, but recommended after 2k)
remove the json file and hardcode your token
Lol
add a catch to it
client.login('my token')
.then(console.log)
.catch(console.error);```
then reset your token again
I did
They are never helpful
it's worked on 2 of my other apps so far
To discord it always boils down to "there must be a coding error on your side"
wtf, I started it with different code now tho
but it wont start with nothing
Finally
If ur banned from discord you'd get an error along the lines of /api/v7/gateway
it started finally
Lol
Nothing I do seems to work. Now I am getting DiscordAPIError Missing Access On top of the Missing Permissions error/warning in my console log.
Showing the exact error would help a lot @earnest phoenix
that is the most recent one
the missing Permissions error/warning never changes
The first one most likely has to do with your internet
The second one is that ur bot doesn't have permissions to do smth in a server
I'd check if the bot has those permissions first, and throwing an error if it doesn't (before doing the action that requires that permission).
My internet is ok and I don't have problems with other bots, And I know the issue with the Missing Permissions because this server doesn't give bots any permissions. So all of today I have been trying to get the bot to stop flooding my Console log with those warnings/errors and nothing I do seems to work. and I don't know about the Missing Access error/warning as that was the first time it ever happened.
Change your username
Buutt I don waannaa..it looks cool.
have a mod or staff change my nickname for now..if more than you keep asking then I will
if (GoogleAuth.isSignedIn.get()) {
// User is authorized and has clicked 'Sign out' button.
} else {
// User is not signed in. Start Google auth flow.
GoogleAuth.signIn();
}```
how can i add herf function in there?
herf?
href @copper cradle i make mistakes sorry
ooh
$('#sign-in-or-dashboard-button').html(user.w3.ig).href('/Dashboard.html');
so the href isnt working from there
I actually thought herf was something lol
lmao
let muterole = message.member.guild.roles.find(r => r.name === "DJ")
if(!muterole) return;
(node:2414) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'roles' of undefined
ok lol
idk
TSC Tutorial right?
idk
and then i added it in my music code
there was a glitch in volume command
ex: &&volume 9999
you can limit the vol tho
ik yes
@earnest phoenix for a week U think it should be 604.800
@earnest phoenix how old are you
Hi
__Respond to non-prefixed commands __
My bot responds to commands without prefix, on a channel previously authorized by a user with server management rights .permit. Does that break the rule?
Send automatic messages without being triggered by a prefixed command
My bot sends messages that are delayed (<5min) due to a user command, this breaks the rule?
this'd need more context for me to understand what you mean
in relation to what points? both?
on the first one I think it's fine, but I don't get the second one
e.g. : you send a timer with the command 1 (without prefix; but in authorized channel) , after a delay (like 30s for the command 1), bot respond
this should technically be fine, but like try to prove it to someone that saw a "random message" like that out of context
Can someone help guide me through adding the vote webhook to my code? I use discord.js, and I plan to add the webhook in my index, (which already has the server states api in it)
const dbw = new DBL(``, { webhookPort:, webhookAuth: '' });
dbw.webhook.on('ready', hook => {
console.log(`Webhook running at http://${hook.hostname}:${hook.port}${hook.path}`);
});
dbw.webhook.on('vote', vote => {
console.log(`User with ID ${vote.user} just voted!`);
});```
Iโm not getting any vote logs. Can someone tell me what Iโm doing wrong
How can I host 24/7 on glitch
you buy a vps
as a serious answer, you already are hosting 24/7 on glitch. if that doesnt work, use uptimerobot to ping your projects domain every 5 minutes
I tried uptimerobot but my bot still go off after I leave glitch page
I use glitch and uptime robot and mine are both online 24/7
thereโs many guides how to setup a bot on glitch
if(time === "second"){
time = "seconde(s)";
}
else if(time === "minute"){
time = "minute(s)";
}
else if(time === "hour"){
time = "heure(s)"
}
message.channel.send(`**โ
Salon verrouillรฉ pendant ${ms(ms(time), { long:true })}**`)
Translation to French so that its replaces for example hour through heures does not work. Who can help me?
It showing err on 49 line
And there is no err
Line 49 is empty
Now tell xyber
@pallid zinc Check if you miss any }
Also, I'm using Heroku instead of Glitch. Heroku is much better and easier to use
You may use Heroku if you cannot use Glitch
heroku is free?
Chan.send, so kawaii
did you write the bot in glitch, or did you import it?
also capitalizing a variable name, smh
what does the ms function do @earnest phoenix
You're calling it twice which already makes me wonder what's going on
But yeh sure
Show the entire code for the ms function
ok
It's a function you wrote?
y
e
s
const ms = require('ms');
module.exports.run = (client, message, args) => {
if (!client.lockit) client.lockit = [];
let time = args.join(' ');
let validUnlocks = ['release', 'unlock'];
if (!time) return message.channel.send('**โ Veuillez introduire un temps.\n__Balises :__\n1s = 1 seconde\n1m = 1 minute\n1h = 1 heure.**');
if (validUnlocks.includes(time)) {
message.channel.overwritePermissions(message.guild.id, {
SEND_MESSAGES: null
}).then(() => {
message.channel.sendMessage('**โ
Lockdown dรฉsactivรฉ.**');
clearTimeout(client.lockit[message.channel.id]);
delete client.lockit[message.channel.id];
}).catch(error => {
console.log(error);
});
} else {
message.channel.overwritePermissions(message.guild.id, {
SEND_MESSAGES: false
}).then(() => {
if(long === "second"){
long = "seconde(s)";
}
else if(long === "minute"){
long = "minute(s)";
}
else if(long === "hour"){
long = "heure(s)"
}
message.channel.send(`**โ
Salon verrouillรฉ pendant ${ms(ms(time), { long:true })}**`).then(() => {
client.lockit[message.channel.id] = setTimeout(() => {
message.channel.overwritePermissions(message.guild.id, {
SEND_MESSAGES: null
}).then(message.channel.sendMessage('**โ
Lockdown dรฉsactivรฉ.**')).catch(console.error);
delete client.lockit[message.channel.id];
}, ms(time));
}).catch(error => {
console.log(error);
});
});
}
};
module.exports.conf = {
enabled: true,
guildOnly: false,
aliases: ['lock'],
permLevel: 2
};
module.exports.help = {
name: 'lockdown'
}
yes ^^
What you're doing doesn't make sense
just a translation
what the hell is ms?
The ms module returns the "hours" "minutes" stuff
So you calling ms on your edited values
@earnest phoenix I am 19. why do you ask?
Yes I woke up a little bit ago and finished a shower, everyone having a convo rn you can ignore me as I am responding to a question that was asked at 2:30AM my time in this channel
Will obviously not work
Ayy
Edit them after using ms
not understood.
Where it says /dashboard
ms returns that
use ms
Then change the result
Your logic is just wrong
Switch order
And it'll work
k
@earnest phoenix I also use heroku but now module problem
i don't recommend using heroku for your bot's host
hey here is a crazy idea
dont use free hosting
yes gamers
bash bash bash but please use correct statements when doing so
Your token isn't going to get leaked because you use heroku
Heroku is an actual company that also has paid plans
They state that their repos are private
Big doubt that they are just lying about that.
In the case that they are, I'm pretty sure you can sue them and earn a good bit of money.
gO FOr iT
Anyway
Hey I'm on phone how can I switch a bot to be online I have a bot
Is a special tool to switch a bot to be online?
I wonder how people go about having their bot in multiple languages as their are multiple ways I can think of.
Do you use an api, do you make a request to that api each time, do you save the translations somewhere in your own database, ...?
If anyone wants to share their ways, that would be greatly appreciated. 
Not looking for code, just the logic you're using. (but perhaps if you use an api, a link to that api would be nice)
the thing that would mostly make sense to me (and what im working on right now) is a webserver written in python that exposes a few endpoints, and my js bot just sends requests to it
@white brook short answer no, long answer yes on few phones using Android 9
alternatively, you could just do what i did in my Freeman project, where i just use exec and grab the output from stdout
oh
did you write code for your bot
uh..
okay now i could just link you to #502193464054644737 but i have nothing better to do so
you need to write some code in a programming language with a proper code editor to make your bot do... things
if you dont know any programming languages, there are shitty programs that essentially make the bot for you, but theyre bad
tfw you try to explain a simple concept nicely but whitenames just dont understand :(


