#development
1 messages · Page 501 of 1
try mutedAt = new Date(); unmuteAt = new Date(mutedAt.getTime() + durationTimeInMilisecondsiThink)
whats the full error
How can I add redirect to my invite link for my bot? I tried to do it but it didn't work
@whole condorcheck ur internet
Thats The error we get when Websocket disconnects iirc
o
yes, but it might be anything from him trying to access a broken api to using the wrong address
i tried going to 104.16.59.5 and it requires special headers to allow access
@sick cloud try to store them as timestamps then, instead of date objects
@stable tide this is a vps...
timestamps? @quartz kindle
104.16.0.0/12 ips are cloudflare
which is why you need the headers to access
otherwise they wouldn't know where to connect
yeah
ew gross

anyways
just put in the same line wih the if
i wonder
oh ok
literally the only one with the return outside the if statement
fine
commands/fight.js btw
lol
Nice token
lmao
you have an env file
but not even going to put your token in it
@lost scarab reset your token and put your resetted token in your .env file
done
also there is no commands folder
nvm env broke
you have no commands folder
also i thought the .env was going to hide it like glitch says
but it didn't
lmao
wait
what?
but what exactly is it
too bad they can't be used
you put it back ing the public botconfig.json tho
i did
also your stories are unable to be used
thats way past discords character limit
they work just go into #265156322012561408
Users/bots can't ban people that have the same role position as another member, correct?
yeah
ok
same role or role position
abecause
two roles can't have the same role position
if they have a nother ole above yes
but
what about when both members highest roles are the same
i said yes twice dream
thats the only thing we're talking about
oh yeah
i was wrong
but you can remove roles of someone with the same highest role as you
what's the issue
i need that 2 be yellow
am i inputting something wrong
dbl api and development:
50% property of undefined,
25% unhandled promise rejection
25% "there are no errors but it still doesnt work"
100% people with no clue
?
ok
highlighting opening and closing 
what is this error 
i am learnijng how 2 code
and in the video
it shows this
tthe dbl api .hasvoted is 24 hour check right?
yellow
or 12 hour
its just the theme
vscode will shout at you if there is an error
ok
now
it does not show this
is should sow this
@topaz fjord
haha
how about node filename.js
so node index,js
Or just node index
What
did you save the file 👀
Save the file
@earnest phoenix do you know how to code?
or node
laerning
learning*
console.log 
finally
Go to the file and hit cnrtl + s
it worked
Ok
Why node .
that targets the index file afaik
o
ok
do you have a problem ma'am
i cant turn on my bot
i cant b/c i have discord.js and discord.js-commando
why do you have both
anyone want to give me command suggestions, hmu in dms
wut
thats not how commands work
thats not how it works
I suggest whatever tutorial you're using, ditch it, and find an updated one
https://owo.oooooooooooooo.ooo/i/z781.png sendMessage is deprecated
anyone have command/bot ideas. dm me
you dont need to say it again
but i have nothing else to do
a bot that mutes for:
-code not in code block
-posting questions with "property of undefined" in the text
-posting questions with "unhandled promise rejection" in the text
that is not dm
wait
and it should give special role with special channel
teaching how to fix the problem
a bot that mutes for undefined
yes
@ Oliy please add

a bot that mutes people who ask to ask
yes
why tf does the discord overlay not show ur cert Tim
a bot that mutes people that ask how to make a bot
no idea?
discord broke
i can see ur cert
i have these intervals setup, and im wondering if i can make it so the interval only runs a certain amount of time
if i have this
how do i add a
Playing ________
...
client.user.setActivity(“what you want it to be playing”)
and they are the same thing?
or have handlers
@earnest phoenix
Hey there!
Although tedious, this is almost a mandatory step for any Discord bot developer. I have linked some resources below to help you get on with your journey.```
DiscordJS Documentation -
https://discord.js.org/#/docs/main/stable/general/welcome
NodeJS Documentation -
https://nodejs.org/en/docs/
NPM -
https://www.npmjs.com/
Tutorial Series -
https://www.youtube.com/watch?v=rVfjZrqoQ7o
ok Thank you\
how do I get a list of roles with eval
Map the guild roles collection, by a property such as name
depending on the library, a guild object should have .roles property
in discord.py that returns the guild roles in random order
but luckily there's a guild.role_hierarchy
yeah I did that
also Glitch is bad because it says the bash has errors
but I didn't make a bash + debugger dosen't load
ovh is better
you don't have to worry about nerds stealing your bot either
The debugger is early in development and still probably full of bugs itself :)
do you know how to map all roles by their name
I never mapped roles, so no...
ok found it
.eval guild.roles.map(r => r.name).join("\n")
use VSC
it is much better
you should know it
Ur internet
Uh
lol
Virtual private server
seriously though, when i got a vps, my bot instantly got 500x faster
oh
what did u run it on before
although it doesnt help that i live in a 3rd world country, and self-hosting on this kind of internet is impossible
my bot's ping was anywhere from 500 to 15000
lmao
it was very unstable lmao
i get like 30ish ping on my mac and on my vps
funny enough, i get 50 ping in league of legends
link me pls
link what?
link me a VPS
there are many
Takes 10 seconds to look up
i use google compute engine
still using free credit 
same
is it just me or is the discord server going insane
its fine here
just you?
testing category is being deleted then added 4 me
hek
any good free VPS
gcloud free tier
ok
yes, but you still need a credit card to create an account
¯_(ツ)_/¯
its not 100% free though, they still charge you for outbound traffic
its like 2 cents a month tho
a discord bot uses surprising amounts of data
where do you check
@quartz kindle they shouldnt charge you unless you upgrade
that might not be the right one
do you have music on your bot
no
i did 1.563 gb and it cost $0.07
but it does send a lot of images

90% of my commands output images
8gb per month is still a lot though
your bot is also big in scale so
how are you getting 8gb egress then
xD
no idea
your images must be large
default is 800x800 png
average 100kb per image
u have to advance thru it
unless
I dont think I ever reached 1gb of data with 100 servers if you exclude music
im sending images as buffers, maybe their size is bigger as a buffer
nah
nah
or ask your dev that your paying $100 a week to do it

then i have 2 pay 4 a domain

unless you dump some useless shit into it before sending
you are already paying $100 a week for a dev

no i lowerd his price 2 50$ a week
(50#)
(50$)
if my images are about 150kb, then 8gb/month would average about 2000 images per day
is there a linux tool to measure traffic?
uh
like how much data was send/received per process for a given amount of time
i found a lot of tools that show network speed, but not traffic log
does it show totals tho? i only see current
hm
i found a hidden option in nethogs
sudo nethogs -v 3
hmm i dont know if this is normal
but in about 2 minutes, i got 5mb received and 500kb sent
on idle
?
?
my bot uploads ~1mb per 5 minutes while being idle, which totals ~8gb per month
what the fuck

How do I show that on how many servers my bot is? Google Translate
Gibt's hier Deutsche?
what lang and library
algum br?
@terse geode sim, mas vc so pode falar ingles aqui. outros idiomas só em #memes-and-media
@earnest phoenix Python | discord.py
My Developer ( @storm tartan ) has already done this & true unsuccessful. :(
why the fric are there so many people hiring developers for discord bots now
@storm tartan Wenn du Englisch kannst, schau ob dir hier geholfen werden kann.
Yeah
well, i asked in the d.js server
they said 1mb per 5 minutes "seems normal"
which is 12mb per hour, 288 per day, 8.640gb per 30 days
¯_(ツ)_/¯
gg?
well yeah
or ovh
i might in the future
fonction.channellogs(message)
if (!Dresseurs[sender.id]) return message.channel.send(`Vous devez être un dresseur pour commencer (Commande : \`${prefix}Start\` )`)
var Dresseur = [];
var NbPokemons = NbPokemons
var Team = Team
var Noms
var nb = 0;
var rank = 0;
for (var i = 0; i < message.guild.members.map(user => user.username).length; i++) {
if (Dresseurs[message.guild.members.map(user => user.id)[i]]) {
nb++;
var Dresseur1 = Dresseurs[message.guild.members.map(user => user.id)[i]];
Dresseur[nb] = {
Points: Dresseur1.Points,
NbPokemons: Dresseur1.NbPokemons,
Team: Dresseur1.Team,
Nom: Dresseur1.NomDresseur
}
}
}
Dresseur.sort(function (a, b) {
return b.Points - a.Points;
});
for (var i = 0; i < nb; i++) {
if (Dresseur[i].id == i) {
rank = i;
}
}
var TopMsg = "";
var topcount = 1
for (var i = 0; i < Dresseur.length - 1; i++) {
TopMsg += (`\n[**${topcount}**] - ` + `**${Dresseur[i].Nom}**` + " : " + `**${Dresseur[i].Points}**` + " Points | " + `**${Dresseur[i].NbPokemons}**` + (' Pokémons | Team : ' + `**${Dresseur[i].Team}**`))
topcount++
}
const TopPoints = new Discord.RichEmbed()
.setColor(0xFF88FF)
.addField("Top Dresseurs du Discord :", TopMsg, false)
message.channel.send(TopPoints)
}```
My top is infinite, how to make it stop at 5?
jesus
can someone send me a good design for an eval command
I don't like how it looks
Can program yourself. My PC is broken and I can not continue learning until I have a new one
@earnest phoenix
Who can help me privately?
lmao
😂
it only happened after an update'
@lofty hamlet if(topcount > 5) break
wherever you want it to stop after 5
actually you dont even need that
if you want a for to stop at 5, just do i < 5 instead of i < array.length
Where you can change my code ?
fonction.channellogs(message)
if (!Dresseurs[sender.id]) return message.channel.send(`Vous devez être un dresseur pour commencer (Commande : \`${prefix}Start\` )`)
var Dresseur = [];
var NbPokemons = NbPokemons
var Team = Team
var Noms
var nb = 0;
var rank = 0;
for (var i = 0; i < message.guild.members.map(user => user.username).length; i++) {
if (Dresseurs[message.guild.members.map(user => user.id)[i]]) {
nb++;
var Dresseur1 = Dresseurs[message.guild.members.map(user => user.id)[i]];
Dresseur[nb] = {
Points: Dresseur1.Points,
NbPokemons: Dresseur1.NbPokemons,
Team: Dresseur1.Team,
Nom: Dresseur1.NomDresseur
}
}
}
Dresseur.sort(function (a, b) {
return b.Points - a.Points;
});
for (var i = 0; i < nb; i++) {
if (Dresseur[i].id == i) {
rank = i;
}
}
var TopMsg = "";
var topcount = 1
for (var i = 0; i < Dresseur.length - 1; i++) {
TopMsg += (`\n[**${topcount}**] - ` + `**${Dresseur[i].Nom}**` + " : " + `**${Dresseur[i].Points}**` + " Points | " + `**${Dresseur[i].NbPokemons}**` + (' Pokémons | Team : ' + `**${Dresseur[i].Team}**`))
topcount++
}
const TopPoints = new Discord.RichEmbed()
.setColor(0xFF88FF)
.addField("Top Dresseurs du Discord :", TopMsg, false)
message.channel.send(TopPoints)
}```
You can edit my code ?
I don't know
i already told you what you have to do. its up to you now. i have to go out anyway
But i'm french i don't understan anyway
You can edit plz 😣
Or just say where i place this line
@quartz kindle
google translate:
je ne sais pas quelle partie vous devez arrêter à 5. de toute façon si vous voulez arrêter une boucle FOR à 5, faites simplement i < 5 au lieu de i < blablabla.length
?
I test
@quartz kindle nice french
thank google
the only thing i actually know in french is je ne parles pas francais merci bocoup
f = open('userlist.txt')
line = f.readline()
while line:
st = line
st = st[:-1]
userlistwithformatting = ('<@!' + st + '>')
line = f.readline()
f.close()```
I have some user IDs of Discord users in this file (users can add their ID via a command). I want to make a command that grabs all of the IDs in the file and outputs them. The problem with this though is that it's only setting the last line of the file to "userlistwithformatting". If I want to format all the lines in the certain way that Discord interprets the user IDs ( <@![userID]> ), and then store it to a variable, how do I do that?
@earnest phoenix thats not a lang thats a lib
also since your using d.js
Math.round()
Yo homies
does anyone know the answer to my problem above ^^
i believe i already told you lol
I'm coding in C#,
I'm trying to have it set as, if the elapsed time = the amount of time the person set, then it sends the message
I have this but it has an error with "Time"
TimeSpan ts = stopwatch.Elapsed;
if (ts = time)
{
embed.WithTitle("**Time!!**");
embed.WithDescription("Your time is up!");
embed.WithColor(new Color(129, 127, 255));
embed.WithThumbnailUrl(Context.Guild.IconUrl);
await Context.Channel.SendMessageAsync("", false, embed.Build());
}```
umm
me?
yeah, your loop is replacing the variable everytime
you have to concatenate or use arrays
Oh ok
https://owo.oooooooooooooo.ooo/i/kjua.png any reason this is getting a messageUpdated event when nothing has changed? code: js let logchl: any = db.fetch(`${oldMessage.guild.id}_logchl`, {target:'.channel'}) if (!logchl) return; let channel: any = oldMessage.guild.channels.find((c: any) => c.id === logchl) if (oldMessage.content === '' || newMessage.content === '') return; channel.send({embed: { title: 'Message updated', fields: [ { name: 'Old Message', value: oldMessage.content }, { name: 'New Message', value: newMessage.content } ], timestamp: new Date() }})
i use quick.db cause im lazy pls no make fun
i know a simple fix i just want to know why
its doing it
are you checking if the old message is the same as the new message @west raptor
Are you accounting for embed updates?
@topaz fjord i just did
what is that domain
idk
also are u using the messageUpdate event
yea
how do you install d.js master with npm again?
thanks
what is the max amount of time for .setRateLimitPerUser()? like .setRateLimitPerUser(5)
anyone know how to get the bot's server names, in a comma seperated string? discord.py async version, cmds ext
That doesn't even sound like a library specific question, it's as simple as using .join(list)
i dont like python's way of doing that
i think myarray.join(' ') is a lot simpler imo
and looks a bit cleaner
in the d.js docs it says bufferutil is faster when not using uws
does anyone know if this is also true for Eris?
it doesnt say anything about it in the Eris docs, just that both can make the bot faster
@bot.event
async def on_member_join(member):
embed = discord.Embed(title="Member Joined")
embed.add_field(name="User",value=member.name)
embed.add_field(name="Time",value=datetime.now())
try:
channel = discord.utils.get(member.guild.channels, name='general')
await channel.send(embed=embed)
except:
channel = discord.utils.get(member.guild.channels, name='bot-testing')
await channel.send(embed=embed)
else:
channel = discord.utils.get(member.guild.channels, name='bot-hell')
await channel.send(embed=embed)
What it does:
Sends the person who joined to my server
What I want:
sends to the server of the person who joined
Thanks in advanced
😐
what? i dont understand
tim stop being a dum dum
also
@earnest phoenix you code doesn't say to send it to a specific server
it says to just send it to any channel with the name general
@bot.command(pass_context=True)
async def servinv(ctx):
if ctx.message.author.id.startswith('261236127581601793'):
serversearch = discord.utils.get(bot.servers, name=ctx.message.content[10:])
if serversearch == None:
await bot.say(":no: | **This server cannot be found.**")
return
else:
try:
n = await bot.create_invite(destination=serversearch)
await bot.say(":yes: | " + n.url)
return
except Exception as e:
await bot.say(e)
else:
await bot.say(":no: | **You don't have permission to use this command.**")
return
Anyone know how to fix my invite code?
id is not a string, can just do id == 261236127581601793
id is only a string in js iirc
@earnest phoenix So what do i do?
i know why the problem is happening
i don't know how to fix it
soz
i don't use python
Am I allowed to have swear words in my bot's responses?
oh alright tnx
how do get a role set of a memer with .toLowerCase()?
I want to make a purge command and you need to have mod / admin role and I don't want the roles to be those exact names.
like it's case insensitive
Can somebody tell me how can I make my Discord bot status set to streaming?
@earnest phoenix lib?
JS
K thx
Hello, I have this error in my code
TypeError: Cannot read property 'name' of undefined
code
if(message.content.startsWith(prefix + "userinfo")) {
const user = message.mentions.users.first() || message.author;
const embed = new Discord.RichEmbed()
.setTitle(`Informations about`)
.setDescription(`${user.username}` + "#" + `${user.discriminator}`)
.setThumbnail(user.displayAvatarURL)
.setColor('RANDOM')
.addField('ID', user.id, true)
.addField('Username', user.username, true)
.addField('Discrim', user.discriminator, true)
.addField('Status', user.presence.status, true)
.addField('Bot', user.bot, true)
.addField('Game', user.presence.activity.name)
message.channel.send(embed)
}```
i think the problem is
.addField('Game', user.presence.activity.name)```
You'd be right
user.presence.activity is null
You have to make sure it's not null first
Can someone tell me is there an error that causes my bot to not set its status to stream?
client.user.setActivity(‘http://codiac.onuniverse.com’, `https://twitch.tv/codiacbot`, {type: “STREAMING”});
@earnest phoenix check to make sure that stats names is STREAMING AND NOT SOMETHING ELSE
How should I do that?
if you want to compare use a if statement but if u just want to print out the status then check the documentation for the activity
Hey can somone help me with the Server count on the website i had do all same but its not works libary discord.py
i use the example
which example?
from the API page
yes
did u put the correct api key?
yes
and whats the error?
Notinhg
u mean it doesnt show on the website the correct servercount?
yes
How to detect the person who puts a reaction on a message with :
const collectorM = msg.createReactionCollector(MinutesCollector, { time: 900000 });
collectorM.on('collect', async (r) => {
})
@whole condor pls explain more
help me out
from discord.ext.commands import has_permissions
import discord
with open('reports.json', encoding='utf-8') as f:
try:
report = json.load(f)
except ValueError:
report = {}
report['users'] = []
prefix = '#'
bot = discord.ext.commands.Bot(command_prefix=prefix, description=description)
@bot.command(pass_context = True)
@has_permissions(manage_roles=True, ban_members=True)
async def warn(ctx,user:discord.User,*reason:str):
if not reason:
await bot.say("Please provide a reason")
return
reason = ' '.join(reason)
for current_user in report['users']:
if current_user['name'] == user.name:
current_user['reasons'].append(reason)
break
else:
report['users'].append({
'name':user.name,
'reasons': [reason,]
})
with open('reports.json','w+') as f:
json.dump(report,f)
@bot.command(pass_context = True)
async def warnings(ctx,user:discord.User):
for current_user in report['users']:
if user.name == current_user['name']:
await bot.say(f"{user.name} has been reported {len(current_user['reasons'])} times : {','.join(current_user['reasons'])}")
break
else:
await client.say(f"{user.name} has never been reported")
@warn.error
async def kick_error(error, ctx):
if isinstance(error, MissingPermissions):
text = "Sorry {}, you do not have permissions to do that!".format(ctx.message.author)
await bot.send_message(ctx.message.channel, text)```
whn i use it says
```eError: name 'MissingPermissions' is not defined```
@lament meteor How to know the user who puts a reaction
@earnest phoenix can u do ```py on ur code
stable right @whole condor
look at https://discord.js.org/#/docs/main/stable/class/Message?scrollTo=createReactionCollector @whole condor
Yes but I do not have access to the ID of the person who reacts ..
collected.user.id @whole condor :/
wait no
it is
collector.on('collect', async (r, user) => {
console.log(user.id)
})
sorry, please help me 🙏
Anyone knows can we send message or chat to somebody from external service using Discord chat API?
if an external service is programmable or has an API, you can link both and broadcast messages to each other's apis
for example, a telegram bot and a discord bot broadcasting to each other
We are programming a service what users can login by Discord account, and we want to let them can chat each other on our platform using discord chat server.
We dont build private chat server.
That's not possible.
@quartz kindle
Thank you so much.
for example, a telegram bot and a discord bot broadcasting to each other
Do you think it is one way good for my application?
@astral quail
That's not possible.
😩
do you have any idea for replaceable solution?
yes it is possible
you want to create a private chat system powered by discord
discord has special integrations for that, for example their game integration api to create discord chats inside games
you just need a discord server and a discord bot that sends and receives messages to and from your service
you want to create a private chat system powered by discord
How can we do it? Do you have any documentation about this? 🙏
what is your service built on?
then integrate a discord bot in it
any discord library
set up a server and monitor messages. when a new message is posted in the server, send to your service. when a new message is posted in your service, send to your server
set up a server
did you mean it is a private chat system powered by discord?
a normal discord server
you have two options, either people can chat in both, your discord server and your service
or people can only chat in your service
for the second option, you create a discord server and have nobody in it, only your discord bot
@quartz kindle yeah but he wants to make one without his own server stuff
you cant without a discord server
Yes, we only provide discord chat functionality in our service. We dont own any games, any discord chat servers.
Discord bot can send message directly to anyone, doesn't it?
If they accessed to our service via oauth2 authentication, can we send message to them directly using discord bot?
Maybe it is impossible too...
Discord bot works for our discord server, doesn't it?
do you know how to solve this problem? thank you
get ffmpeg
Yes, but how to do it ?
one sec
no problem 😉
you'll just need to google it, shouldn't be that hard. make sure to include what os you're using
Okay thanks you
@jagged plume
I have a problem with my bot discord, he does not play music
And how can I fix the problem?
by passing a string instead of an object
But I do not know the object ^^
if you dont know what an object or a string is, then you should study more
After joining the channel he does not put the music
If I know, but I do not know which channel
oof
sinner
editing your bot a whole bunch of times is ok, people do it all the time
im kinda minimodding aren't i 
i got a bit of problem
im trying to like execute function on command
like if command is given
function will pause
and if command is given again function will continue
thats a bit messy.
{
*function1*
}
//if message "asd" given, stop function 1
//if message "asd" given again, start function1
@bronze wagon uh you could do it two ways
have a condition if paused and check it then with a while loop check if it is true (every x seconds)
if true than stop the loop and continue
or you could break it up to several smaller functions and use a setinterval to see if the value is x and start the function
Ill try to figure it out, tnx
hey
my VSC is saying this has a issue in it
const discord = require('discord.js');
const bot = new discord.Client();
bot.on('ready' , () => {
bot.user.setGame('Rainbow Six Siege')
//Normal SetGame Status is: Prefix Is ZTB Creator is EmanSza
bot.user.setStatus('Online')
});
bot.on('message' , (message) =>{
if(message.content == '>ping') {
//message.reply('pong 10.75MS');
message.channel.sendMessage('pong');
}
});
bot.on('message' , (message) =>{
if(message.content == '>Help') {
//message.reply('pong 10.75MS');
message.channel.sendMessage('Help Ping');
}
});
send message is deprecated
the help one right
And you don't need 2 message events
i dont ?
no
so do i do this then
sendMessage is deprecated in both
const discord = require('discord.js');
const bot = new discord.Client();
bot.on('ready' , () => {
bot.user.setGame('Rainbow Six Siege')
//Normal SetGame Status is: Prefix Is ZTB Creator is EmanSza
bot.user.setStatus('Online')
bot.on('message' , (message) =>{
if(message.content == '>ping') {
//message.reply('pong 10.75MS');
message.channel.sendMessage('pong');
if(message.content == '>Help') {
//message.reply('pong 10.75MS');
message.channel.sendMessage('Help Ping');
}
});
would that work
const discord = require('discord.js');
const bot = new discord.Client();
bot.on('ready' , () => {
bot.user.setGame('Rainbow Six Siege')
//Normal SetGame Status is: Prefix Is ZTB Creator is EmanSza
bot.user.setStatus('Online')
});
bot.on('message' , (message) =>{
if(message.content == '>ping') {
//message.reply('pong 10.75MS');
message.channel.sendMessage('pong');
}
});
if(message.content == '>Help') {
//message.reply('pong 10.75MS');
message.channel.sendMessage('Help Ping');
}
});
You're closing the message event too early
code block pls
```js
code```
what does that do?
puts it in a code block
this
make it easier to read
^
``const discord = require('discord.js');
const bot = new discord.Client();
bot.on('ready' , () => {
bot.user.setGame('Rainbow Six Siege')
//Normal SetGame Status is: Prefix Is ZTB Creator is EmanSza
bot.user.setStatus('Online')
});
bot.on('message' , (message) =>{
if(message.content == '>ping') {
//message.reply('pong 10.75MS');
message.channel.sendMessage('pong');
}
});
bot.on('message' , (message) =>{
if(message.content == '>Help') {
//message.reply('pong 10.75MS');
message.channel.sendMessage('Help Ping');
}
});``
no
const bot = new discord.Client();
bot.on('ready' , () => {
bot.user.setGame('Rainbow Six Siege')
//Normal SetGame Status is: Prefix Is ZTB Creator is EmanSza
bot.user.setStatus('Online')
});
bot.on('message' , (message) =>{
if(message.content == '>ping') {
//message.reply('pong 10.75MS');
message.channel.sendMessage('pong');
}
});
bot.on('message' , (message) =>{
if(message.content == '>Help') {
//message.reply('pong 10.75MS');
message.channel.sendMessage('Help Ping');
}
});```
yes
thank you
np
setGame is deprecated
now dont do bot.on("message") 2x. only 1x
use setActivity
ok
and you have a lot of outdated functions
you're following an old and outdated tutorial
would any of you would like to help me with this
sendMessage is old and outdated. you should use send instead of sendMessage
he's using yorks
discord frooze
so i do this
const bot = new discord.Client();
bot.on('ready' , () => {
bot.user.setGame('Rainbow Six Siege')
//Normal SetGame Status is: Prefix Is ZTB Creator is EmanSza
bot.user.setStatus('Online')
});
bot.on('message' , (message) =>{
if(message.content == '>ping') {
//message.reply('pong 10.75MS');
message.channel.send('pong');
}
});
bot.on('message' , (message) =>{
if(message.content == '>Help') {
//message.reply('pong 10.75MS');
message.channel.send('Help Ping');
}
});```
something like dat
ok
which of these would cause this?
https://i.imgur.com/izdRbxS.png
https://i.imgur.com/h9zMrl1.png
manage roles then?
you dont need to check if they equal true
its MANAGE_GUILD not MANAGE_SERVER
they return a boolean anyways
I check for true because I use emojis instead of true and false
yes but you can do if(message.guild.me.hasPermission(....)) { ... } else { ... }
ty @quartz kindle
hasPermission returns a boolean doing js if (thing) { ... } checks if it is true
no reason to do js if (thing === true) { ... }
yes sir
yes papa
help me ?
can anybody help me?
<@&304313580025544704>
You just pinged all the mods
Why
?
whats?
Why did you ping all the moderators?
I need help to put the number of servers where my bot is currently as I do it?
What lib
sorry I did not want to bother
py
ye
len(bot.guilds)
?
I want to put it on the website
Oh
I don't know then
:/
Please don't tag all mods in the future
sorry
Do I need to change something on the site to show the server count?
What is the dbl token?
@hushed berry ?
show what you did
okay
@quartz kindle
That's a long AF token
??
whats
@earnest phoenix
the token
and it doesnt work? does it show any error?
the bot usually connects but does not appear on the site the number of servers
dbots tokens are long @earnest phoenix
I think its a jwt
did you copy this? https://discordbots.org/api/docs#pylib
your code looks different than this
try this py def setup(client): global logger logger = logging.getLogger('client') client.add_cog(DiscordBotsOrgAPI(client))
else i dont know, i dont use python
i think you dont need to change those
client there gets converted to bot up there
i think
i might be wrong, i dont know python
😦
@earnest phoenix yes
# Update server count on Discord Bot List (DBL)
# Variables
token = config.dbltoken;
dblpy = dbl.Client(bot, token, loop = bot.loop);
# Function
async def update_dblservercount():
await bot.wait_until_ready();
while not bot.is_closed():
try:
await dblpy.post_server_count();
print("Posted server count on DBL");
except Exception as e:
print("Failed to post the server count on DBL");
print("Error: " + str(e));
await asyncio.sleep(1800);
bot.loop.create_task(update_dblservercount());

dosen't tell me the error
but my bot is offline
my help plss
@topaz fjord look, another one of my suggestions 
the "no error but doesn't work"

im legit about to make a bot that does this

dms them with "hey, you just sent a message with "property of undefined" in the text, why not take a look at these links? <insert codeacademy link here>"
yes

hey i have a question
hey I have an anwer
how can i have my bot say somthing when i upload a youtube video
try IFTTT
that might have something for you
like i want it to say some thing wen i upload a youtube video like how and should use a api
ok but how do i use a api
pls
I don't think you have to use a bot for that, IFTTT provides you the free way of webhooking these events
dont you think ive already tried googling it
how about instead of googling "how to use youtube api", try googling "youtube discord webhook"
yep u must have ur eyes closed tho
How do I know if the apple is working?
first result
Does somebody ever used the Patreon API to get Discord IDs of subscribers?
@earnest phoenix s9 or 8
8
I think I did everything well, but:
{
"errors": [
{
"code": null,
"code_name": "InternalError",
"detail": "An unrecoverable internal server error has occurred.",
"id": "asd",
"status": "500",
"title": "Internal Error."
}
]
}
xD
the back button is supposed to be on the left
no I switch
everytime I include the social_connections param
I prefer this way
otherwise all the others are working
I'm used to since hardware buttons on Samsung's for many years
I'm not using the all just looking at the webhook responses @cold niche so cant help sry
but the webhook format is ass :p
this is bad too
rip
It took me 3 hours to figure out how it works
dame why u so rufe im just asking question @earnest phoenix
He's not rude
but the webhook isn't always accurate and I want to get data not just on changes
he's just showing you how easy it was
not accurate? 
I think I'll end up parsing the website xD
ill end up just not using it tbh
yeah they say sometimes they don't send out the events
oh rip
it happened with me 4 times
damn
better to request all the subs/ids once a day
and keep it up to date in a db
plus I won't drop the hooks either
but this seems to be broken
well if you work out how to get social connections working dm me i would appreciate
alright
How do I know if the dbl api is working?
ok
no response
ur a pain to work with
the only "reliable" way we've found to get discord IDs is to iterate over all the pledges
I guess it's time to switch to braintree xD
What if the user doesn't belong to any pledge but donates some money
the user cannot not belong to any pledge
Just use your bot 
message.guild.members.forEach(g => {
if(g.nickname.startsWith("!")) {
}
})
would this work? (sorry for sending it again)
if nickname is not undefined
and is valid property of guildmember
then yes
haha yes
wouldnt displayName be better
check if their displayName has a hoisting character and nickname them
oh ok
and also use what tom said
localecompare or die
mobile pls
camelCase*
I need to figure out how to pretty print logging in golang
functions without camel case when™
I need to figure out how to put my commands into reloadable modules with go
So I don't need to restart the bot on changes
you cant do function with camel case in golang
if you do camel case it counts as a private function
ok so
im looking at localeCompare
and
i got u dawg dw
gimme sec to type on mobile
if(nickname.charAt().localeCompare("a") < 0) {}
do displayName instead, @earnest phoenix
spoonfeed







