#development
1 messages · Page 335 of 1
i made an api to do all my image processing in python
GG
psst it was a contract
hey you
lul
yes

I don't think that's working, might want to quit trying.
probably disabled for a reason.
Same i dont see anyone here they must be all offline
?
@supple sage
@supple sage
@supple sage
@supple sage
😫
Someone ban this troll pls
so why trying to ping everyone lul
they'll hate you isntead of help you lol
no one can
its annoying asf
Nobody ever checks this channel unless they are pinged
And just go on do not disturb
no one just wait till some1 magically appear
That could take hours
nah they do
And I have a life so I dont have hours
Ya dont say?
nickolas cage face here
Okay wait
How good are you with javascript
¯_(ツ)_/¯
Discord.js
i can
Okie
just say it lol
Willing to help?
Okay so
Im trying to do a string line for my bot to say
How do I insert, for example
To the strong, but put something after it
*string
And have the thing after it connect to the first part
Ill give an example
No

Im using VCS
Like
For example
"I am working, <@' + message.author.id '>'
How would I connect the last part to the first part
But still have it append the ID
lel
` code `
?
Darnnabit
^
?
you cant put if statements there btws
Hm okay
Thats not how mine works, but i get the idea
you dont need the <@ > part
Thank you!
np
Nope
Isnt working
It says "undefined"
.mention is only used for getting something from a mentioned user
🤦
Okay wait
No
yep
well i used djs once
Discord.js
and i'm sure it is like that
if its d.js
Its not
message.author
Ik
yeah
like next line?
"I am working, " + message.author.id ">"
🤔
How would I still append the value
But have the last part connect to the first part
tho

no need to do + lol + bull shit
Yes you do
&&
just use `` isntead lol
Bruh
oop
its js
yes
lol
i know discord.js too
js itself
"example" is the same as ``
no
Yes
🤔
Lol
^
then come back if anything is wrong.
Somethings wrong
Yes
Cannot read "map" property of null

send code pls
^^^^^
('I am working, ' + message.author.id `>`);
omg....
I did your `` thing
nonono
(`I am working, ${message.author.id}`)
^
nono
🤦🏻
Yes
'' is for string
is for strings*
Wait
why dont you go to codecademy or maybe MDN?
('I am working, + message.author.id');
Omfg
no
Thats not my code format
i'm not jason
JSON
🤦🏻
ok ok
your making my brain hurt
i'll link you to mdn rn.
AH WAIT
read this
Oh lol I get it now
Your simply injecting it directly into the string without disrupting it
r e a d i t
Lol all I wanted to know was the syntax
l o l
Well, thank you guys
so you dont run into anymore problems like this
we*
How do I code if you can help me please message me
..
How do I intergrate an automated verification system (for Discord accounts) using the bot; Auttaja?
when rocketbot wants you to promise something... he wants you to promise pending xD
@fiery swallowTheFlash#5543 Now Live dev here... if you have questions about the bot, please go to the support server for the bot... (apologies for the delayed response)
kek
Having trouble updating my server count. Worked in the past, and I have since generated a bot specific token and slotted it into the Authorization header, but I'm getting a 401 "error": "Invalid auth"
It was working before the update
What language do you use
Just making a raw request with Postman right now
Just want to confirm I need the user token and not the bot token?
** other way around
yes
My bot's id would have changed, would it?
No the ID never changes
@here can someone help me i do not know how to make a bot please help me I beg
- learn how to code
- code a bot
- don't be a dumbass.
coding is fun tho
- install a good programming language onto your computer.
not always
especially when you have to refactor half the project

and by hand
because the changes were too big to regex it
May I ask a few (dumb) questions?
nou
well uhh..
--is there any reasons why Server Guard (a Discord bot) is offline?
ok
-botinfo @livid hatch
hello owo
Offline mmhhlol
mmLel
mmEme
that
mmMeme
so uhh, since Kyle's offline (yes, I did check right now)
--is it possible to create an account verification system with the bot; Auttaja? and how?
we arent bot experts
states they aren't an expert at bots.
possesses the Bot Developer and Certified Developer role.
Ok.
@earnest phoenix Just set your server verification level
I'm too gay for that
I just prefer the automated method with bots
--but thank You for the suggestion though.
i mean im not an expert with every single bot
they all work differently
and you cant expect me to know how every single one of them functions.
anyone knows how to make a advanced ping command like ms
because i forgot how to
😦
lib: discord.js
ping command isnt advanced 🤦
get time -> send request to api -> on response calculate diff
well I'm going to make a verification system with DynoBot, is that ok?
also how do I create a verification system using DynoBot? I'm dumb when it comes to Discord bots, :/
xd
@earnest phoenix pings will ever return millisecods tfw
welp, atleast if there isnt any api problems
but still its just <result> + "ms"
lol
h!ping
im having trouble with o2auth links
Oauth2*
Error name? 
append &redirect_url=the_place_to_go_after to it
^
@jagged plume did that and still didnt work
what are you even trying to do tho
im trying to reinvite my bot since it cannot delete channels without o2auth link
i did it like oh ready a fews times and it didnt work
using that
send link pl
ok lemme try one more time
no the error happens when you invite it
is this bot yours?
yes
but it required OAuth2 to delete channels.
Wtf no
it requires permissions.
what requires Oauth are dashboards like dyno's dashboard
try in other guild lol
i think discord hates my bot
👀
@earnest phoenix is the guild 2factor enabled?
both of them?
Wist
from a mod that has 2auth
if it needed perms then it would be Missing permissions
@earnest phoenix its not missing perms
@earnest phoenix I believe you are getting that because you don't have 2fa enabled on your account
Altho, I had the same issue the other day when I have 2fa on
¯_(ツ)_/¯
qp.emoji("angry")
this doesnt work
qp is my message var
im trying to make a reaction.
qp.react(emoji_object) What lib are you using?
djs
@lament mantle ah what? why did you ping me?
what kind of stuff can i do with the dbl api? could i make like a dbl command with stuff ?
thx
economy.updateBalance(defineeuser + message.guild.id, parseInt(args[0])).then((i) => {
});```
It says that **args** is not defined...
halp
economy.updateBalance(defineuser + message.guild.id, parseInt(args[0])).then((i) => {```
thats my addbal command
they are the same
@uncut slate
I doubt they are
anyone know how to make a mention prefix so when you mention the bot the bot responds
Thats easy just look for @pale light and @pale light
The second one is used when the bot has a nickname set
@pale light boop
k
I tried that 
How to set-up a changable prefix?
discord.js
wow

Lollll
rip
args is not defined you are doing something very wrong
@slow swan ik that but idk how to fix it
you need to define it
maybe you should learn a programming language before you actually make a bot
wow...
let args = message.content.slice(prefix.length + <num).trim().split(/ +/g)
you dont have to define args manually

mention prefix ;[
anyone have an idea
const prefixMention = new RegExp(`^<@!?${bot.user.id}>`);
prefix1 = prefixMention.match(message.content) ? message.content.match(prefixMention)[0] + " " : prefix1;
trying to make a mention prefix
TypeError: prefixMention.match is not a function
at Client.bot.on (C:\Users\Sid\Desktop\BobBot\bot.js:80:26)
at emitOne (events.js:115:13)
at Client.emit (events.js:210:7)
at MessageCreateHandler.handle (C:\Users\Sid\Desktop\BobBot\node_modules\discord.js\src\client\websocket\packets\handlers\MessageCreate.js:9:34)
at WebSocketPacketManager.handle (C:\Users\Sid\Desktop\BobBot\node_modules\discord.js\src\client\websocket\packets\WebSocketPacketManager.js:103:65)
at WebSocketConnection.onPacket (C:\Users\Sid\Desktop\BobBot\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:330:35)
at WebSocketConnection.onMessage (C:\Users\Sid\Desktop\BobBot\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:293:17)
at WebSocket.onMessage (C:\Users\Sid\Desktop\BobBot\node_modules\ws\lib\EventTarget.js:99:16)
at emitOne (events.js:115:13)
at WebSocket.emit (events.js:210:7)
at Receiver._receiver.onmessage (C:\Users\Sid\Desktop\BobBot\node_modules\ws\lib\WebSocket.js:143:47)
at Receiver.dataMessage (C:\Users\Sid\Desktop\BobBot\node_modules\ws\lib\Receiver.js:389:14)
at Receiver.getData (C:\Users\Sid\Desktop\BobBot\node_modules\ws\lib\Receiver.js:330:12)
at Receiver.startLoop (C:\Users\Sid\Desktop\BobBot\node_modules\ws\lib\Receiver.js:165:16)
at Receiver.add (C:\Users\Sid\Desktop\BobBot\node_modules\ws\lib\Receiver.js:139:10)
at TLSSocket._ultron.on (C:\Users\Sid\Desktop\BobBot\node_modules\ws\lib\WebSocket.js:139:22)```
@topaz fjord this is what I use, you might be able to do better
const match = msg.content.slice(0, 22).match(Bot.prefixRX);
const prefix = match ? `${match[0]} ` : msg.channel.guild.prefix;
Bot.prefixRX is a
new RegExp(`<@!*${this.client.user.id}>`);
lol
if i have a string that is set as "0", how do i increase it by 1 or a certain amount?
string = ${parseInt(string) + 1}, depends on why you need that though
you could get away with just parseInt(string) + 1 too depending on how you're using it
hm, hold on ill try get the code im using
for every user i do this
if(!credits.get(message.author.id)) {
credits.set(message.author.id, "0");
}
why are you keeping it as a string?
ew
idk because then im putting it in a msg @slow swan
then just turn it into a string then
you can store it as an int lul
Values must be "JSON.stringify()able", meaning they must be able to be converted to a string. This includes strings, numbers, arrays, and objects. Other Collections, Maps, or Sets cannot be inserted.
but how?
i wonder if javascript has something alike python's pickle
@small solar yes
ok thanks 😄
so for an add credit cmd i can do this?
if (message.content.toLowerCase().startsWith(prefix + `addcredits`)) {
let member = message.mentions.members.first();
let args = message.content.split(" ").slice(2).join(" ");
let string = credits.get(message.author.id);
parseInt(string) + args
}
in the + args thing?
no
oh..
get rid of that, that's completely wrong
not really, no
ikr i'm wrong bye
yeah you are
lol
if (message.content.toLowerCase().startsWith(prefix + `addcredits`)) {
let member = message.mentions.members.first();
let args = message.content.split(" ").slice(2).join(" ");
let string = credits.get(member.user.id);
credits.set(member.user.id, parseInt(string) + args)
message.channel.send(`:dollar: ${args} credits were added to ${member.user.username}'s balance.`);
}
that good?
@small solar something along the lines of credits.set(id, credits.get(id) + n)
drop parseInt you don't need that if you're storing them as integers
righto
if (message.content.toLowerCase().startsWith(prefix + `addcredits`)) {
let member = message.mentions.members.first();
let args = message.content.split(" ").slice(2).join(" ");
credits.set(member.user.id, credits.get(member.user.id) + args)
message.channel.send(`:dollar: ${args} credits were added to ${member.user.username}'s balance.`);
}
that good?
depends on how you're defining args, try and find out
okay
well its defined right there
let args = message.content.split(" ").slice(2).join(" ");
ya, won't work
oh
so i'd have to get an int of sorts from the msg
bc its gonna be a>addcredits @user 100 for example
mhm
:\
right now, args is a string
how would i do that? never worked with ints in messages
do i use something to convert it to an int?
parseInt, but that could error so u need to check if the args is a number first
this is getting more confoosing by the minute xD
not really?
well like idk how to do any of this thats why sadly
could i do
let args = message.content.split(" ").slice(2).join(" ").parseInt();
?
no
oh
parseInt can only select whole numbers at the start of a string
parseFloat can select decimals too
@small solar
also, parseInt isn't a prototype, it's a function
meaning, wrap the function around text that you want to parse
ok
me not understanding what i am doing wrong as the command isnt doint anything nor displaying errors: https://hastebin.com/meyomajaqi.coffeescript
finally my bot was approved
gg
hello I have a problem with my CSGO-STATS.NET
on my servers that can help me ????
Hmm
ok
@outer copper you're using discord.js right?
I use the program discord on window

what
sorry for my english i'm not good i can speak only one
I don't speak French
@earnest phoenix I have a problem with some of my commands...
message.mentions.users.first() is never working for me :/
could you help?
using discord.js library btw
any reccomendations?
@earnest phoenix, @vocal sigil and @earnest phoenix anyone who could help me with message.mentions.users.first()
?
where can I find the API of my servers
What language is that?
Btw did you just randomly ping people?
Actually several but I don't think anyone will give a shit
Js dudes are rude
#nooffence
@noble hazel wanna help me?
They are only rude because people are stupid xD
Oh Bob you code c or Js
@prime cliff could you help?
Nah
-.-
@crystal void don't ping people
sry
@crystal void ?
They'll get mad and will not help
@noble hazel I need help with message.mentions.users.first() (js lib)
i dont do JS
Have you tried a thing called debugging your code its what all bot devs do 
oh... .-.
also
my servers are in .exe I do not use it on js
lemme look into it
ty @noble hazel
oh....
shoot
GoN dm me
{"code": 50041, "message": "Invalid API version"}
message.mentions.users.array[0]?
uh
ok @vocal sigil
did
what did you search
it's fd up...
heres a tip on how to google: language yourproblem eg js how to get first item in array
best to take a look at the docs for your lib then
see what the array contains
so for instance, if message.mentions.users contains an array of user objects
that means you get a user object for every item in the array
thank you @noble hazel
just trying to help out
oh another tip, dont ever go onto the API discord. they are all assholes.
i was going to say, if you try to ask for help. they will shout at you for not knowing
who could help me to install CSGO-STATS.NET
on my discord ???
You dont install it you invite it
he is already inviting
this is BOT development, not bot inviting/support
but bot web page still gives
{"code": 50041, "message": "Invalid API version"}
Invalid api version lmao
how can i change the api version ???
Can somebody help me get the stats bot in my server
Offline 😄
O people online
😏
Error could not find user
Same
@earnest phoenix i dont know d.js but i do know debugging and looking at the docs helps alot
Oh
I did though
I just want to know how to make a bot give a full list of servers that its in
I looked at the documentation and it didnt help
cough cough
@here
COUGH COUGH
chokes
X_X
look harder
I did
I tried what the documentation said
It, of course, didnt work
I probably need an arry to manage the names data
Not sure how I would set that up though
Oh Ik that
But i tried bot.guilds.name
Im pretty sure I need an arry
To manage the data
@earnest phoenix have you considered learning a programming language first
@slow swan have you considered not stating the obvious
I know one
But dats none of your buisness
Anywho
Other than mr. salty over here
Can anybody help?
how am i salty
i only suggested that you learn the programming language you are trying to use
Okay are we really getting into this
Sir
Im not an idiot
I know I need to learn the language
But for the time being, I cant
So im trying to use what knowledge I have about it
¯_(ツ)_/¯
Is anybody willing to help?
And not just mock me?
We don't like to help people who aren't willing to help themselves
🤦
I did help myself
If I didnt try everything, I wouldnt be here rn
But I tried everything, still isnt working
so
Okay
So I think I would need to do bot.guilds.arry().name?
so you need to make a function that takes the guild object as an argument and outputs the name of it
🤔
use bot.guilds.map(your function here) to do that
you need to make a function that accepts the guild object, and outputs the name (<Guild>.name)
You dont even know about arrays 🤔
So bot.guilds.map(guild.name)
No
so what do you have now
bot.guilds.map(guild => guild.name)
alright now that makes an array of guild names
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/join now you need this
to turn it into a string
Oh!
', '
Oh thats so cool
Wow thank you so much
Oh jeez
Im getting an unhandled promise rejection
This is my code
message.reply(bot.guilds.map(guild => guild.name).join(', '));
🤔
that should work
bot.guilds is null 
Did you call your Client bot or client?
discord.client
Different client
That didnt work either
@earnest phoenix no dont use Discord.Client
thats the client that you construct
Which client
My gid
<@&304313580025544704> help
banne PLO
Whats it called
bans
What
can I see your code @earnest phoenix ?
You should only have one
where you make the client
please dont include your token
const bot = new commando.Client(); const Discord = require("discord.js"); const client = new Discord.Client();
You don't need 2 clients for commando
Oh
ok im here to calm the situation
Which should I keep
bot
can we remove this rosen man please
Can you mute / ban @lunar orchid
@earnest phoenix make sure you replace all your code where it says client with bot
Can I see your whole code? (without your token)
Heres the command code
``const commando = require('discord.js-commando');
class ServerNamesCommand extends commando.Command {
constructor(client) {
super(client, {
name: 'servers',
group: 'cool',
memberName: 'servers',
description: 'Gives a full list of servers'
});
}
async run(message, args) {
message.reply(bot.guilds.map(guild => guild.name).join(', '));
console.log("Command run: Servers in " + message.guild.name)
}
}
module.exports = ServerNamesCommand;``
Yes
i think you need to do like
this.client.guilds.map(guild => guild.name
etc
not sure how commando works
Whats "this"?
Wait should I add back client then
Oh okay
bot.guilds.size works
So it must be the same code

where is the bot.guilds.size?
WAIT
Hold on have something that might work
Nvm
Alright
Its in my main bot index
bot.user.setGame(bot.guilds.size + " servers | Being Developed");
let me just read some of the commando code real quick
Okay
@earnest phoenix alright do this.client.guilds.map(.... you know the drill
Okay
commando seems to place the bot object at this.client
message.reply(this.client.guilds.map(guild => guild.name).join(', '));
that should work
👏
Thank you so much xD
np
just to note in the future you should have a nicer approach when people speak to you
Okay sorry >.>
Its just everyone on this server is very hostile to me
For some reason
I think its because im not very good with javascript
Okay >.>
alrighy then
so if i had accidently fired up my bot using shards previously, would the website require me to post shard information..even if i dont have it? cause i cannot, cannot post server_count
and somehow copypasting my token back in made it work magically
w u t
const embed = new Discord.RichEmbed()
.setTitle(prize)
.setTimestamp()
.addField("Time: " + time)
.setDescription("React with:balloon:to enter the giveaway")
.setFooter("Started at ");
msg.channel.send({embed}).then(msg.react("🎈")).catch(console.error);``` who does it not react? ```js
Error: (node:4) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): DiscordAPIError: Unknown Message```
you were already told on the D.js server to look up Promises
because thats not how they work
guys, how can i get the message content?
like
when i send "xd" i want my bot to send "XD"
.js
if message.content = "xd"
message.channel.send("XD")
doesn't work here
oh
@languid dragon doesn't work
show code
if(message.content = "xd") {
message.channel.send("XD")
};
🤦
you go to the official javascript documentation and learn 2 code 👀

i know how to code
but .contains or .startsWith doesnt work
@languid dragon that's rude, to judge by the cover
probably because thats not how the code works
im judging the book by the contents
you showed me code that clearly showed flawes in your knowledge of javascript 😉
l0L oK
It's safe to assume you dont know when you could simple read the documentation for help
i mean
Deni 2.0 when xD
AMIRITE?