#development
1 messages · Page 620 of 1
@white brook my own, it's not on the play store
Also I am not planning on sharing it
"a bot switch" lmfbao
"switch a bot to be online"
@grizzled spruce yea
😢😢😢
?
ok
ok
stop being annoying
I actually don't know what IOS9_SIGNED_ZIP_FILE
Yes I do not know
OK
It’s a troll guys don’t pay mind to him
IS A IOS FILE WITH THIS FILE YOU CAN RUN IOS on ANY PHONE
IOS IS MORE BETTER THAN ANDROID
You can’t install iOS on android
No you can
Now please.
Accept no iOS
Or buy an iPhone
No you can run ios
Everything you find will either be a virus or it’s just gonna be a theme
No
Accept it
Your “signed iOS file” is likely a virus which will brick you
If you truly believe it’s real unzip it into your root directory and still watch it brick
iOS is a private OS, Apple does not share their iOS files making it an Apple Exclusive system, Android is open source meaning anyone can take the code and make their own os running a form of android.
that is very simple definition
What’s the name of like the android kinda theme thingy’s
Launcher
Yea
It’ll either be a launcher or a virus that will brick you
However seeing that you’ve left it seems that you’ve actually listened to my advice of unzipping it into your root, which was a joke, but hopefully now you’ve learned your lesson 👀
and its not open source
No Consent and Stealing
Alex, even if it was legit, that is illegal
If you want iOS get an iPhone
Then u don’t want iOS lmao
#S10
So you want iOS and hate iPhones ok
I don't like Android and I love IOS
when this whitename couldnt comprehend that they need to write code to make a bot i didnt know the conversation is going to be this stupid
Don’t discriminate against people for whether they have a bot dev role or not ty
Alex what don't you like about android?
its a joke name anyways not actual discrimination
@slim heart you bad cuz ur a dev kid
Ok but ur the same race role as me so
No one cares
#NotWhiteImABotDev
Alex if you want iOS get iPhone
If you like Samsung then you get Android
If the company is not Apple, its Android
Nokia is in the Android league now
However they do have their feature phones still
Is that still a thing people give to their children
but not really in production anymore
Yes that is a feature phone, like the Nokia 3310
@white brook we don't do that here, and running an ios that's cracked is highly illegal and can lead to problems, i suggest you uninstall it and go to the apple store and buy a actual iphone which already has IOS. we can't help you with your problem since this is bot development, not illegal phone development.
If you like iOS so much, then buy an iPhone.
You’re so self-contradicting... you think iOS is superior but you refuse to pay the money for one.
If you dont give one shit about what phone you are getting -> Go Iphone
If you dont give one shit about what phone you are getting and dont like IOS or iPhones -> Go samsung
If you like to tinker with your phone, or have some specific features you want -> Find the right android
If you like using nice headphones -> Go LG V or G lines.
At least thats my simple formula I tell friends and family
By dont give a shit, i mean the really non techy people that just dont really care
Or just get the pixel
Very customizable, easy to root, you can edit literally everything on it (gen 1)
Only reason i went for a V35 as opposed to the pixel 3/xl (3a was not out) is the headphone jack
Came up from an OG pixel (10/10 great phone, started boot looping)
I got my battery replaced at a ubreakifix and it went really well. Then like 6 months later she ded
s10 looks nice, so pricy tho.
@west spoke
I like the full front screen. But no headphone jack is a deal breaker. Same case for the mi mix3 I was eyeing up
I mean phones are losing them unfortunately
const search = require("yt-search");
exports.execute = (bot, message, args, prefix, ops) => {
search(args.join(" "), function(err, res) {
if (!message.member.voiceChannel ) return message.channel.send("**Join to Voice Channel.**");
//if (message.guild.me.voiceChannel) return message.channel.send(":x: Sorry the bot is already connected to a voice channel");
if (err) return message.channel.send("**:x: Try again.**");
let videos = res.videos.slice(0, 10);
let resp = ``;
for (var i in videos) {
resp += `**${parseInt(i)+1} | ${videos[i].title}\n`;
}
resp += `\n**:notes: Please provide a number 1-${videos.length} :notes:**`;
message.channel.send(resp);
const filter = m => !isNaN(m.content) && m.content < videos.length+1 && m.content > 0;
const collector = message.channel.createMessageCollector(filter);
collector.videos = videos;
collector.once(`collect`, function(m) {
let commandFile = require('./play.js');
commandFile.execute(bot, message, this.videos[parseInt(m.content)-1].url, prefix, ops);
})
});
}
module.exports.help = {
name: "search"
}```
at Object.exports.execute (/app/commands/search.js:6:15)
at Object.exports.execute (/app/commands/play.js:10:24)
at processTicksAndRejections (internal/process/task_queues.js:86:5)
(node:30186) 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(). (rejection id: 1)
(node:30186) [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.
(node:30186) UnhandledPromiseRejectionWarning: TypeError: args.join is not a function
at Object.exports.execute (/app/commands/search.js:6:15)
at Object.exports.execute (/app/commands/play.js:10:24)
at processTicksAndRejections (internal/process/task_queues.js:86:5)
(node:30186) 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(). (rejection id: 2)```
yeah it stinks, at some point I will go all bluetooth, but I have spent way too much money on different wired headphones and IEMs. I cant just make them all obsolete :feelsbatman:
can i got help?
well, args.join is obviously not a function
can you console.log(args) and see what it is?
if it isnt an array then you fucked up
args.split().join(" ")
if(!prefixes[message.guild.id])
prefixes[message.guild.id] = {
prefixes: botconfig.prefix
};
let prefix = prefixes[message.guild.id].prefixes;
console.log(prefix);
let messageArray = message.content.split(" ");
let cmd = messageArray[0];
let args = messageArray.slice(1);
fs.writeFile("./prefixes.json", JSON.stringify(prefixes), (err) => {
if (err) console.log(err)
});
How would I convert this from .json storage to SQLite
- learn sql
- Make the db
- Query db
You'd have a table of guilds and make one of the columns a prefix column and then use sql queuries
^^ Thats a good starting point, the work will be very worth it.
^
sql is a language
sql is a query language to be more exact
yes
not a programming language and thank god not a normal human language
i code in css
honestly seeing as json is overutilised for everything i wouldn't be surprised if there was an actual attempt
there is an actual programming language for databases that's called pl/sql
it is kind of SQL
Yeah there are a decent amount of SQL derivatives that are turing complete
Then again, microsoft powerpoint is also turing complete. So thats not saying a ton
@earnest phoenix
jesus christ
lmfao
lmfbao
I mean its js under the hood, but still hurts
oof
Im looking for a dev to help me code dm me you most likey got to teach me a bit...
just... ask your question here?
im a noob at coding and i want someone to teach me how to use a data base
How to do research
@barren brook https://www.youtube.com/watch?v=FR4QIeZaPeM
https://www.guru99.com/introduction-to-database-sql.html This Database tutorial explains the concept of DBMS (Database Management System).To help beginners, ...
hm k
a lot of people's problem here is not knowing how to do research for themselves 🤷
it's a skill you should better learn earlier than later
^
also ReferenceError: command is not defined
at Object.<anonymous> (C:\Users\Alex\Documents\Clan Bot\index.js:21:45)
at Module._compile (internal/modules/cjs/loader.js:701:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
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 Function.Module.runMain (internal/modules/cjs/loader.js:754:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
my command helper is not working
giw code
k
try {
let commandFile = require(./commands/${command}.js);
commandFile.run(bot, message, args);
} catch (err) {
console.error(err);
}
did you define command? like (command) =>
um no i didnt im dumb...
@shy rose @unique nimbus this is the kind of stuff I'm talking about

It's not even about the docs: ReferenceError: command is not defined
It's about having common sense
Why would u use a variable that doesn't exist (insert that emoji here where there's that small question mark next to the black guy)
lol
That thing ^
U dont have nitro do you
no
That’s the fella I was sending about in #memes-and-media! Guess he was getting disappointed with my help
LOL
@gilded plank bots @earnest phoenix
@tropic prism
Still waiting for approval
Cool, how does that relate to the conversation or belong in #development
it doesnt
Ok then
can someone help me with discord-passport, it says TokenError
i was too lazy to switch channel

Well it has to say more than just TokenError... what's the actual message @earnest phoenix
one min then
And the mods r too lazy to ban u for that unsolicited advertising, so ur off the hook I guess @earnest phoenix
It's not like the mods do anything here anyways
They're asleep
Except when ppl trash talk them
Then they get roused up
jkjk mods u cool™
nvm i just reset the secret
boredom
@opaque eagle yeah ik
And it's cause of Google
Yea...I think imma give up on it. Nothing I try will stop it from flooding my Console log with warnings and errors.
I hate when people don't read the error
It literally says "Missing permissions" John
And it's being caused by this server not giving it the propper permissions that won't be fixed
Yeah
var user = GoogleAuth.currentUser.get();
if (user) {
$('#sign-in-or-dashboard-button').html(user.w3.ig).href='/Dashboard.html'.src=user.w3.Paa;
console.log(user)
} else {
$('#sign-in-or-dashboard-button').html("Login")
console.log(user)
}
}```
hey why cant i use .href='dashboard.html' ????
Eww jQuery
Vanilla JavaScript is so much cleanerjs const btn = document.getElementById("sign-in-or-dashboard-button"); btn.setAttribute("href", "dashboard.html");
wait what?
is there a way to detect if a user gets banned/deleted off discord?
not off a server but discord as a whole
lmfao
I dont even use that and I know about it
Whomst the fukc
someone called chips
They left? Lol
👀
bruh

👁 👀 
whitenames?
what color is your name? (I'm moving to #memes-and-media so answer there)
can someone give me the link of the DBL Css repo
Chewey till now I am hosting on heroku only but it after I add new code it stop working
Lmao
you used an invalid domain name
help with like market, or otherwise db commands i believe db commands no clue how to start
Beginner ?
Bajingan itu seseorang yang tiba² datang mebuat nyaman lalu pergi..
Toxic dikit😂 @everyone
ive heard its good
I have a friend who can host your bot 24/7 in 1 dollar
and @gray python english only + dont try to ping @ everyone
Better then galaxygate
anyone knows if zlib-sync and erlpack are incompatible with node 12?
they install fine in node 11 but not in 12
Lots of modules are broken in node 12
it seems to work if i install them in 11 then switch to 12
but idk if im generating needless overhead with internal errors tho
because they are optional libaries, and supposed to improve djs's performance
Pls rich
commands in #265156322012561408 @main sluice
Hi, I've added a bot I made to my discord server, and assigned it a new role with the "Send Messages" permission globally turned off. Yet, he's still able to send messages on all channels. The only way I found is to manually add the role to each text channel and disable the permission... but I'd like to avoid that. Any idea where to look at?
The bot role have write permission
@lost seal if the permission is granted to everyone, you have to use your method, what i found easiest is setting their permission for the category
The Role created vy the intergration have i think the permission to send messages
Here for examplethe music role
@lost seal
Help
@light matrix Forgot about categories permissions, setting it on category level seems to work
Thanks for the help guys
I need some bots
Make them or get them
Get them n make them
can you have more than one client.on I am working through the tutorial and am wondering...?
Yes, there are many different events to listen to
Just avoid listening to the same event multiple times
ie: ```client.on("message", msg => {})
client.on("guildMemberAdd", member => {})```
ah yep thanks
@indigo geyser ik how to do it in python3
Ok
No need to specify the 3 tbh
@light matrix I use it
I use Client
There's someone who can help me pls?
(sorry for my Eng)
just post your issue
i dont use pythonk
Idk what Phynton is
i was going to say i never even heard of phynton
I’ve never heard it Phyton either
it just gets even worse
Python?
Ok tnks
hey, i am trying to get an api query based on the guide here https://discordjs.guide/additional-info/rest-api.html#using-node-fetch
A guide made by the community of discord.js for its users.
but getting an await async function error
i am using client.on('message', async message
never mind
i commented out my other client.on
and its ok
do you have 2 client.on('message'... handlers?
yeh i had one for non async commands
Just use ""
for both of them?
Np
i am getting an error on the Random cat example though
i copy and pasted the code so am a bit miffed
at Client.client.on (/Users/adrianthorburn/Projects/discordBots/nivbot/index.js:99:28)
at processTicksAndRejections (internal/process/task_queues.js:86:5)
(node:9087) 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(). (rejection id: 1)
(node:9087) [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.```
@pallid zinc both ' and " are valid string identifiers in javascript, it doesnt matter which one you use
Code
if (!message.content.startsWith(prefix) || message.author.bot) return;
const args = message.content.slice(prefix.length).split(/ +/);
const command = args.shift().toLowerCase();
if (command === 'cat') {
const { body } = await fetch('https://aws.random.cat/meow').then(response => response.json());
message.channel.send(body.file);
}
else if (command === 'weather') {
const { body } = await fetch(`http://api.openweathermap.org/data/2.5/weather?q=${args[0]}&units=metric&APPID=7d9ba91ae33f813b901a2b37f72aaac5`).then(response => response.json());
message.channel.send(body.file);
}
});```
ignore the weather stuff
thats next
use superagent
or just literally any fucking http client as it doesnt really matter
i was using node-fetch
File undefined
reference here : https://discordjs.guide/additional-info/rest-api.html#random-cat
A guide made by the community of discord.js for its users.
yes
it would give a different error otherwise smh stop being dumb
can you console.log body?
exactly
must be something wrong about the fetch
yeah
Node fetch requires options i am pretty sure
headers, Method and some other things
fetch('urlhere', {
method: "GET"
});
etc
ok i got it
this is my code
const {body} = await fetch('https://aws.random.cat/meow').then(res => res.json()).then(json => message.channel.send(json.file));
i dont think i need the {body} bit
put it in a variable called res and see what it is ig
uh... why do u use .then with await
learn js then
i followed the guide here
A guide made by the community of discord.js for its users.
dont jump to projects
it is misleadning i think
await .then?
it isn't misleading
on the other hand reading guides is different than learning js
also when inserting code blocks into discord do ```langhere
code ```
you should learn the basics of js
Copying and pasting code you have no clue how works is a bad practice.
^
i suggest learning js instead of copying the code... it's like me trying to do two handed bowling without learning first, it would just be a mess and i wouldn't know how to fix it or understand
i know some JS
still learning obvs
but my point is if you copy paste code from a guide it should work
which in this case it didnt
and that's where you need to learn js
start here https://discordjs.guide
A guide made by the community of discord.js for its users.
paragraph two
The code probably does work, Just coping and pasting hoping that it works because it's from a guide doesn't mean you don't require to learn something about it first.
you've skipped the introduction and went right into the rest of the guide
i didnt lol
in which it didn't make sense
look
anyway
dw thx for the help
but u are kinda right
i did jump to the api stuff
after doing the first few examples in the guide
Fair. Well have fun learning!
or you can just look through https://discord.js.org/#/docs/main/stable/general/welcome, but ok
Yeah, I think he'd need to know a little more first.
let him be
I guess. Have fun!
so i'm trying to look at the docs and see what i'm doing wrong(as this doesnt work) but i can't find out why
any ideas?
msg.channel.overwritePermissions((role => role.name === "muted"), {SEND_MESSAGES: false});```
wait
fuck
nvm
actually yeah i still dont know what im doing
I'm not js, but I think SEND_MESSAGES must be a string
yes
it has to be string
yeah thats the thing i fixed
i didnt realize that
but now im getting
TypeError: Supplied parameter was neither a User nor a Role.
like an id or can i just put 'muted'
get the role from the guild
ok
I wonder how the random module is made
thats how its made
Do you guys know how to make it so when I first invite my bot, it will automatically be given its own role and have permissions?
No
Yes, any invite link
Very nice question btw
If it has a permissions query it will get a role and permissions
Bhai are you beginner ?
Me?
Yup
I mean idk how to define beginner tbh lol I have a functioning bot that does server utility, plays music, etc
I’m not a coding beginner
Ohh
But some administrative stuff for discord I don’t really know completely
the invite link includes parameters that lets people add your bot, and your bot will immedeatly get the permissions they checked. if the bot doesnt have the correct permissions, it cannot give itself other permissions. your bot might join a server where it has no permissions at all, or it may be given admin perms
(way too many people give every bot admin)
including me
setInterval(() => {
randompop = bot.channels.get("555124662619602970")
var pokep = Math.floor((Math.random() * (15 - 0) + 0))
var FinalRand = Math.floor((Math.random() * (Pokemon.Noms.length)))
var embedpoke = new Discord.RichEmbed()
.setColor(embedcolor)
.addField(`Pokémon sortant de nulle part`, `C'est un **${Pokemon.Noms[FinalRand]}** avec **${pokep}** Points`, false)
.setFooter(`Appuyez sur la réaction pour le capturer`)
.setImage(Pokemon.Gifs[FinalRand])
randompop.send(embedpoke).then((anothermessage) => {
anothermessage.channel.awaitMessages(response => response.content === 'capture', {
max: 1,
time: 30000,
errors: ['time'],
})
.then((collected) => {
anothermessage.channel.send(`Pokemon ${Pokemon.Noms[FinalRand]} capturé par ${collected.author.username}`)
if (!Dresseurs[collected.author.id]) return anothermessage.channel.send("Erreur : `Vous devez être un Dresseur pour effectuer cette commande : ?start`")
Dresseurs[collected.author.id].Sac.push(Pokemon.Noms[FinalRand])
Dresseurs[collected.author.id].NbPokemons += 1
Dresseurs[collected.author.id].Points += pokep
anothermessage.delete()
})
/*.catch(() => {
anothermessage.channel.send(`Le Pokemon s'est enfuit`);
});*/
})
}, 10000);
})```
Not work error is : username is not defined
Its undefined
Why ?
Because u didnt define it
where are you getting that?
Of ?
Yes
Yep
Define it with something
its because it doesnt return a Message object
it returns a Collection<Snowflake, Message>
username is basic with discord.js right?
wtf no
pls help
do you know what a fucking Collection is
get the values, get the first value, boom thats your Message object
@earnest phoenix you provided an invalid token
With key ?
no
nope im not
dude, that's exactly what the error is saying
@mossy vine how i can make this 🤔 ?
Unauthorized is invalid token
?
wtf thats not even a discord.js issue
this channel is making me lose so many brain cells help
Its for everything not just bot
i know
but
when i close glitch
its stops working
normally it should work
but when i am console
it workes
const Discord = require ("discord.js");
const fs = require ("fs");
module.exports.run = async (bot, message, args) => {
if(message.author.id !== '546968486606536706' && message.author.id !== '390574128890904579') return message.channel.send("**❌ Vous ne pouvez pas effectuer cette commande.**");
let user = JSON.parse(fs.readFileSync("./blacklist.json", "utf8"));
let identifiant = args.join(' ');
if(!identifiant) return message.channel.send("**❌ Veuillez entrer un identifiant valide.**");
user = {
utilisateur: identifiant
};
fs.writeFile("./blacklist.json", JSON.stringify(user), (err) => {
if (err) console.log(err)
});
message.channel.send(`**✅ L'identifiant ${identifiant} à bien été ajouté à la blacklist.`);
}
module.exports.help = {
name:"addblacklist"
}
When I reorder a second time, it replaces the old
Please help me
when i type a command
it says this
Are you on commando?
Discord.js/commando is what I mean
Somewhere you use a find method not passing a function
but it says
everytime when i type and command
and
when i close glitch its gging
Glitch =/
help me
@earnest phoenix send the code you use inside message event
Because no doubt it's there.
Why are you sending a link to a channel's message?
js ? @lofty hamlet
What do you think it wants to define username? The author of a message?
looks like message was never set
@earnest phoenix yes
ok
How can I get it?
put this:
With my code ?
He's using a message collection so he would require to do collection.first();
setInterval(() => {
randompop = bot.channels.get("555124662619602970")
var pokep = Math.floor((Math.random() * (15 - 0) + 0))
var FinalRand = Math.floor((Math.random() * (Pokemon.Noms.length)))
var embedpoke = new Discord.RichEmbed()
.setColor(embedcolor)
.addField(`Pokémon sortant de nulle part`, `C'est un **${Pokemon.Noms[FinalRand]}** avec **${pokep}** Points`, false)
.setFooter(`Appuyez sur la réaction pour le capturer`)
.setImage(Pokemon.Gifs[FinalRand])
randompop.send(embedpoke).then((anothermessage) => {
anothermessage.channel.awaitMessages(response => response.content === 'capture', {
max: 1,
time: 30000,
errors: ['time'],
})
.then((collected) => {
anothermessage.channel.send(`Pokemon ${Pokemon.Noms[FinalRand]} capturé par ${collected.author.username}`)
if (!Dresseurs[collected.author.id]) return anothermessage.channel.send("Erreur : `Vous devez être un Dresseur pour effectuer cette commande : ?start`")
Dresseurs[collected.author.id].Sac.push(Pokemon.Noms[FinalRand])
Dresseurs[collected.author.id].NbPokemons += 1
Dresseurs[collected.author.id].Points += pokep
anothermessage.delete()
})
/*.catch(() => {
anothermessage.channel.send(`Le Pokemon s'est enfuit`);
});*/
})
}, 10000);
})```
Not work error is : username is not defined
For the guy on general: use .leave()
@light matrix message.guild.me.voiceChannel.leave()
oki
thank you
lemme test it in another server, i dont wanna ping the lovely mods
if it messes up again
@lofty hamlet oh you dont found
No ^^'
@earnest phoenix english only
How can I make my bot send a specific help message when it joins a guild?
Is there an event for that?
Like specifically for when my bot joins a guild, not when anyone else does
Yes its guildMemberAdd events on js
But doesn't use it here bc its not allowed here
Oh really?
Yes
Oh nvm I thought you meant in general
When the bot join a server?
Yes
guildCreate
Ok thank you so much
Check on google, a lots of exemples if you search guildCreate discord.js on google
Np
Nobody can help me ?
bout what?
@lofty hamlet i told you how to do it. Noone will give you complete code smh
Except that it's now that I'm looking for
Before I was with a reaction system I changed for that because no one arrived there including you
And even with that nobody can help me because nobody gets there
@mossy vine
@lofty hamlet what do u need?
I want the id and the name of user who answer "capture"
@copper cradle
Or id and username is not defined
@lofty hamlet
collected.first().author
or
collected.first().author.id
For some reason, a bot can not play music (it just connects to the voice channel and is silent), despite the fact that all modules (opusscript, ffmpeg) are?
He is shy
I would put my money on that they are not set up correctly
@copper cradle
if(args[1].equalsIgnoreCase("help")) {
new Paginator.Builder()
.setText("this following badges are avaiable:")
.setItems(" **Fruit-Badge** ", "item2")
.setItemsPerPage(1)
.setEventWaiter(waiter)
.setColor(e.getGuild().getSelfMember().getColor())
.useNumberedItems(false)
.waitOnSinglePage(true)
.build().display(e.getChannel());
}
<
392249976639455232>
copy pasta that^
check if the bot is even in this server
@steep grail
nerds
its readded
what the
what?
damn luca should have logs when bots are readded
Lol
Have you tried sending it as a regular message
Seems like the paginator thing is to create embeds?
setItems most likely being fields
Field names can't have emojis
Or at least that's not supported on all systems
So perhaps that's your problem
no, but another bot (not nitro) used other global emotes in embeds too http://prntscr.com/nsic82
there isn’t something called bot nitro
Oh yeh
Make sure your bot is actually allowed to use external emojis in the server you're testing it
Could also be your issue
yeah, he can use external emojis
that’s not in fields tho
yours is
this is what he send (not embed)

Yes
yes, I use this
Do you use d.js?
but https://discordapp.com/channels/264445053596991498/272764566411149314/581204205151322142 this is what he sends
I use jda
Ah
Reading docs
The rank system requires a database to hold peoples data yes
google and docs helps
Lmao
@unique nimbus and @amber fractal what do u mean?
There is docs where you can read what to do
ok what is it
Do you know how to code?
yes
What Language?
english
Go read the lib's docs @sturdy depot
k
lmao what
node.js
Ok then go look at discord.js docs
const client = new Discord.Client();
client.on('ready', () => {
console.log(`Logged in as ${client.user.tag}!`);
});
client.on('message', msg => {
if (msg.content === 'ping') {
msg.reply('pong');
}
});
client.login('token');```
that?
No, the Discord API is not the same as discord.js...
Anything D.js specific that you're looking for would be in the D.js docs.
um i dont get it
What don't u get exactly? @sturdy depot
.
]]dotpost
Please do not post dots to clear your messages/get attention. It adds absolutely nothing to the conversation and just causes spam If you need to get attention, then say hello everyone. If you need to clear your messages, then press the Esc key. If you do not follow these instructions you will be muted.
One message removed from a suspended account.
One message removed from a suspended account.
@red salmon your trying to call/read post_server_count on the client object?
assuming its the discord bot client?
how are you calling it?
also have you looked at https://discordbots.org/api/docs#pylib
still haven't clarified how are you calling it?
have you got self.bot=bot
=bot being what ever youve called your client instance
=bot
odd that matches exactly
and that gives the trace you sent above?
the most recent trace msg
@red salmon try post_guild_count where you have post_server_count
*yes i think thats it
cause in update logs says they removed the server count one
@fiery birch how do you go about getting dbl docs updated cause https://oh-mah.ga/B322fEDc.png
that fixed it right?
any decade now 😛
well thats progress
can you send me link to some other cog lib?
ive never used python for bots lol
cause got a feeling ik what it is but need to check how another cog works
any cog
Anyone here know of a good example to get me started on learning how to run bots on android?
Preferably JavaScript or Python
android is uh
not ideal for either of those langs
can you send a url to some cog thing?
Ah, well i used a terminal with something my friend made and it worked
it can do it yes
but its really not designed to run it
ive got a bot builder that can run in your browser if that counts for anything?
Cog? For what purpose would the cog be? [Hopefully I am correctly using the word.] Moderation or something... i can see about looking for a cog for you
can you teach me how to make a program ?
cog question is for @red salmon 
@calm jolt https://google.com
also #502193464054644737
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.
thank you @shy rose
cant really build bots on mobile but you can take the saves and run them off mobile
Ah..
i need to make a bot
cause mobile building support is uh
a wonderful bots
you can try it but like its really not designed for it lol
Alright 
still waiting on cog 
what is cog?
@calm jolt #502193464054644737 has a whole section for this
nvm that question
beautiful how did you do that
without even sending a cog link 
ken is?
tonku?
brain.exe has stopped responding
@red salmon modded clients are a void of tos in case your wondering
im not saying that its just incase you were wondering or considering it
how u do mod code? like mute ban warn etc
Hey everyone I am hiring a developer that is willing to develop me a sneaker monitor
I need someone to develop me a software that can monitor websites and products and notifies you when a product releases on a site or restocks I need to be able to use proxies with the software and I need it to be able to work with discord so basically when the product drops the monitor will send notifications to multiple webhooks to discord with the link of the product and I need it to be able to work with keywords of the product. and I need it to be able to scrape websites for early links for products so you can get the link of the product before it releases on the site and I also want the software to have quick tasks for sneaker bots so basically when the notification shows up on discord it should have an option for you to choose from a couple sneaker bots you want to finish the process with and the notification should also have an ATC (add to cart) link
and the sites I need to monitor are:
all shopify sites
Monitor any new arrivals category
Monitor any Shopify earlylinks
Monitor any Non-Shopify earlylinks
Adidas
Nike
Supreme and much more
if your serious youl want to contact oliy for #434058442764714002
this is discord bot development
but also what chewey said
also im not sure on the legality of making a service of content your scraping
client.on("message", (message) => {
if (message.content.startsWith("!ping")) {
if (fs.existsSync("data\" + .fetchMember(User) + ".txt")) {
fs.writeFile('data\" + .fetchMember(User) + ".txt', 'File has been edited!', function (err) {
if (err) throw err;
});
} else {
let data = "File has been made!"
fs.writeFile('data\" + .fetchMember(User) + ".txt', data, (err) => {
if (err) throw err;
})
}
});
Why is there an error?
(and I don't want to use a config)
whats your error trace?
also .fetchMember is being called on what?
should be client.fetchMember
F:\Discord\My Discord Bot\bot.js:37
if (fs.existsSync("data" + .fetchMember(User) + ".txt")) {
^^^^^
what lib are you using?
const fs = require('fs')
const Discord = require('discord.js')
const client = new Discord.Client()
so in that the on messages event will have the user data in it already
... how do I get the user id then?
Hi guys, how can do i put Emoji on IDE? like this one
@grim narwhal depends on your ide some support them some dont
I'll try it, thx
you may see empty rectangle or other wise \ abcs (random digits) @grim narwhal
F:\Discord\My Discord Bot>node bot.js
F:\Discord\My Discord Bot\bot.js:37
if (fs.existsSync("data\" + message.author.id + ".txt")) {
^^^^^
SyntaxError: Invalid or unexpected token
at new Script (vm.js:80:7)
at createScript (vm.js:274:10)
at Object.runInThisContext (vm.js:326:10)
at Module._compile (internal/modules/cjs/loader.js:664:28)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
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 Function.Module.runMain (internal/modules/cjs/loader.js:754:12)
at startup (internal/bootstrap/node.js:283:19)
@shy rose I used VS Code, where should i go to check support Emoji list?
Wait where?
if you see as is above then vs is fine
let me fix the code
I'm kind of new to js
(not to coding though)
if (fs.existsSync("data\\" + message.author.id + ".txt")) { @shy turret
note the double backslash
the first backslash is escaping the quote
oh wow, I tried \ before but it didn't work. guess I learned its a double backslash now
so the second backslash escapes the first one
nvm hastebin's being a bitch
client.on("message", (message) => {
if (message.content.startsWith("!ping")) {
if (fs.existsSync("data\\" + message.author.id + ".txt")) {
fs.writeFile('data\" + message.author.id + ".txt', 'File has been edited!', function (err) {
if (err) throw err;
});
} else {
let data = "File has been made!"
fs.writeFile('data\" + message.author.id + ".txt', data, (err) => {
if (err) throw err;
})
}
});
F:\Discord\My Discord Bot>node bot.js
F:\Discord\My Discord Bot\bot.js:47
});
^
SyntaxError: Unexpected token )
at new Script (vm.js:80:7)
at createScript (vm.js:274:10)
at Object.runInThisContext (vm.js:326:10)
at Module._compile (internal/modules/cjs/loader.js:664:28)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
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 Function.Module.runMain (internal/modules/cjs/loader.js:754:12)
at startup (internal/bootstrap/node.js:283:19)
client.on("message", (message) => {
if (message.content.startsWith("!ping")) {
if (fs.existsSync("data\\" + message.author.id + ".txt")) {
fs.writeFile('data\\" + message.author.id + ".txt', 'File has been edited!', function (err) {
if (err) throw err;
});
} else {
let data = "File has been made!"
fs.writeFile('data\\" + message.author.id + ".txt', data, (err) => {
if (err) throw err;
})
}
});
that i think
ok i used that
F:\Discord\My Discord Bot>node bot.js
F:\Discord\My Discord Bot\bot.js:47
});
^
SyntaxError: Unexpected token )
at new Script (vm.js:80:7)
at createScript (vm.js:274:10)
at Object.runInThisContext (vm.js:326:10)
at Module._compile (internal/modules/cjs/loader.js:664:28)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
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 Function.Module.runMain (internal/modules/cjs/loader.js:754:12)
at startup (internal/bootstrap/node.js:283:19)
client.on("message", (message) => {
if (message.content.startsWith("!ping")) {
if (fs.existsSync("data\\" + message.author.id + ".txt")) {
fs.writeFile('data\\" + message.author.id + ".txt', 'File has been edited!', function(err) {
if (err) throw err;
});
} else {
let data = "File has been made!"
fs.writeFile('data\\" + message.author.id + ".txt', data, (err) => {
if (err) throw err;
})
}
}
});
take 2
thx it works ❤
wait the command doesn't work...
wait I think I know tis
fixed it
client.on("message", (message) => {
if (fs.existsSync('data\\' + message.author.id + '.txt')) {
fs.readFile('data\\' + message.author.id + '.txt', 'utf-8', (err, beforepoints) => {
if (err) throw err;
})
var nowpoints = beforepoints + 1
fs.writeFile('data\\' + message.author.id + '.txt', nowpoints, function(err) {
if (err) throw err;
});
} else {
let data = "0"
fs.writeFile('data\\' + message.author.id + '.txt', data, (err) => {
if (err) throw err;
})
}
});
So I decided to make a points system.
But after it makes the first file, it makes an error.
I think it doesn't detect the read file into a number
F:\Discord\My Discord Bot\bot.js:37
var nowpoints = beforepoints + 1
^
ReferenceError: beforepoints is not defined
at Client.client.on (F:\Discord\My Discord Bot\bot.js:37:25)
at Client.emit (events.js:194:15)
at MessageCreateHandler.handle (F:\Discord\My Discord Bot\node_modules\discord.js\src\client\websocket\packets\handlers\MessageCreate.js:9:34)
at WebSocketPacketManager.handle (F:\Discord\My Discord Bot\node_modules\discord.js\src\client\websocket\packets\WebSocketPacketManager.js:105:65)
at WebSocketConnection.onPacket (F:\Discord\My Discord Bot\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:333:35)
at WebSocketConnection.onMessage (F:\Discord\My Discord Bot\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:296:17)
at WebSocket.onMessage (F:\Discord\My Discord Bot\node_modules\ws\lib\event-target.js:120:16)
at WebSocket.emit (events.js:189:13)
at Receiver.receiverOnMessage (F:\Discord\My Discord Bot\node_modules\ws\lib\websocket.js:789:20)
at Receiver.emit (events.js:189:13)
json?
I don't like configs
Number cant be in a string on json
how do you even make a json?
nah
found a way to convert string into number
just need to learn number into string
client.on("message", (message) => {
if (fs.existsSync('data\\' + message.author.id + '.txt')) {
fs.readFile('data\\' + message.author.id + '.txt', 'utf-8', (err, points) => {
if (err) throw err;
})
points = parseInt(points, 10)
var points = points + 1
var points = '' + points
fs.writeFile('data\\' + message.author.id + '.txt', points, function(err) {
if (err) throw err;
});
} else {
let data = "0"
fs.writeFile('data\\' + message.author.id + '.txt', data, (err) => {
if (err) throw err;
})
}
});
Variables Changes Into:
1: undefined
2: NaN
3: NaN
4: NaN
Why is the first one undefined
No error
client.on("message", (message) => {
if (fs.existsSync('data\\' + message.author.id + '.txt')) {
fs.readFile('data\\' + message.author.id + '.txt', 'utf-8', (err, points) => {
if (err) throw err;
})
```` points = parseInt(points, 10)` ```js
var points = points + 1
var points = '' + points
fs.writeFile('data\\' + message.author.id + '.txt', points, function(err) {
if (err) throw err;
});
} else {
let data = "0"
fs.writeFile('data\\' + message.author.id + '.txt', data, (err) => {
if (err) throw err;
})
}
});
there
Now your double re defining it
Points parse int
Then the lines below you declear it twice
?
I'm on mobile now so can't point it out but..
k
Basic js now
gotta go
client.on("message", (message) => {
if (fs.existsSync('data\\' + message.author.id + '.txt')) {
fs.readFile('data\\' + message.author.id + '.txt', 'utf-8', (err, varpoints) => {
if (err) throw err;
})
points = parseInt(varpoints, 10)
var points = points + 1
fs.writeFile('data\\' + message.author.id + '.txt', points, function(err) {
if (err) throw err;
});
} else {
let data = "1"
fs.writeFile('data\\' + message.author.id + '.txt', data, (err) => {
if (err) throw err;
})
}
});
just gonna post that and go
F:\Discord\My Discord Bot>node bot.js
Bot is ready!
F:\Discord\My Discord Bot\bot.js:37
points = parseInt(varpoints, 10)
^
ReferenceError: varpoints is not defined
at Client.client.on (F:\Discord\My Discord Bot\bot.js:37:27)
at Client.emit (events.js:194:15)
at MessageCreateHandler.handle (F:\Discord\My Discord Bot\node_modules\discord.js\src\client\websocket\packets\handlers\MessageCreate.js:9:34)
at WebSocketPacketManager.handle (F:\Discord\My Discord Bot\node_modules\discord.js\src\client\websocket\packets\WebSocketPacketManager.js:105:65)
at WebSocketConnection.onPacket (F:\Discord\My Discord Bot\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:333:35)
at WebSocketConnection.onMessage (F:\Discord\My Discord Bot\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:296:17)
at WebSocket.onMessage (F:\Discord\My Discord Bot\node_modules\ws\lib\event-target.js:120:16)
at WebSocket.emit (events.js:189:13)
at Receiver.receiverOnMessage (F:\Discord\My Discord Bot\node_modules\ws\lib\websocket.js:789:20)
at Receiver.emit (events.js:189:13)
and that
Double decleration on on points
And var points like error says isn't defined
Cause you haven't defined it...
fs.readFile('data\\' + message.author.id + '.txt', 'utf-8', (err, varpoints) => {
i did
Not in that scope
Are you using txt files as database 
@shy turret you dont need to convert string into number
Just delete the string
let n = 0
For your let data
There is a string. It is necessary to encode it in base64 using only the node.js tools. How do i do this?
iirc the btoa() and atob() functions exist in node
@proper inlet
Buffer.from(string).toString('base64')
Or that
Thank you
I found out the problem that the file isn't even read.
i dont understand , how i can add my bot to the website ?
Once you login, should see this in the navbar
@shy turret can you send it?
hey here is a solution
dont use text files as a database
hi
(node:116) DeprecationWarning: Collection#find: pass a function instead
can someone help
Hey im beginner ish. Got a basic bot set up looking for ideas for new commands
@earnest phoenix hi
i assume ur using this Collection.find("thing", "something else")
ok so how do u get a deprecation warning
idk
what the fuck
İll try
(node:10232) DeprecationWarning: Collection#find: pass a function instead
can someone help
goddammet 
yes fine
deprecation warning means ur using an old function
that's about to get removed / is already removed
find an alternative to it
find what specific thing hm
(node:10232) DeprecationWarning: Collection#find: pass a function instead
@earnest phoenix <Collection>.find as youre using it, is deprecated. you need to pass a function to it instead
https://discord.js.org/#/docs/main/stable/class/Collection?scrollTo=find
@topaz sphinx Collection is a discord.js thing, so general javascript docs dont apply here
i see
alrighty
@mossy vine quick question btw
u know voting system
how would i implement it when it comes to commands
use the dbl api to fit your needs
do i have to make the user obliged to vote as /vote command or can i disguise it inside another command
you can see if the user has voted when running the command
wdym
inside a frequently used command
:v
as in, if the user use a command called "meme"
Yes
that'd be counted as vote as in the user has used a command that's connected to the bot
including having its own unique id
Let's say instead of /vote you wanted something like /cat
yes
You would just rename the command...?
so what you want, is to only be able to run a command if the user running it has voted?
implement the vote command inside a functional command
That's common tbh
that'd vote hiddenly
you could use the webhook to store the user ids that have voted, and check if the user running the command is included in your array or map of user ids
yes and then log the timer to be 12h 5 min between each vote call
you dont need a timer
u sure?
why would you?
but then why do i need the user id's logged
i mean sure for like one time only
but would it really need to be saved
goal isnt to take all user id's and mass-vote
because .hasVoted might be a bit delayed
while webhooks basically get trigerred instantly
so if a user has voted, they wouldnt need to wait minutes before they can use the command
i thought of just throwing it into a cog
ah wait yes
i see
hasVoted is delayed
but webhook is instant
yes
yes
türk varmı?
i dont use python and i have no idea what a cog is, but yeah, i think youre right


