#development
1 messages · Page 719 of 1
Stay in it for hours if you let ...
portuguese, sorry
Unable to connect. Trying again (3/3) ...
The VM serial console output can provide details to assist with troubleshooting connection issues. See our help document for other possible causes of this issue.
You can greatly improve key transfer times by migrating to your OS login.```
I have JSON for database since one year and my database for my players is this because i can't change this now and today my players have problem with my bot, the .Points of each players change wtf ... It's due by the size of my file ? My .json file size is 13MB
also
once you've reached the limit on your hosting provider or whatever
you cant write data to it
@lofty hamlet what hosting provider your using
Last year I had less skill in js etc and I started my bot with a .json database but I can not change it I have 6000 players. Or I would have to transpose to sql
@cunning goblet i have dedicatate server
64GB ram
also
if your json file
doesnt work anymore
it probably finally stopped working
due to space
you might have to transfer everything over sql as it will save alot of headache later on
oh shoot you can?
well first check if its currupted or not
Mmmh
i tried a convertor and it worked ok
CREATE TABLE IF NOT EXISTS data (
hello VARCHAR(5) NULL,
test_hello VARCHAR(5) NULL
);
INSERT INTO data VALUES
("world","world");
btw i used https://sqlify.io/convert/json/to/sql
My database have this structure
{"349667929559662595":{"NomDresseur":"enzo69007#4575","Points":0,"Grade":"Dresseur Débutant (0 - 350)","GradeG":"Joueur","BDDTitre":["Joueur"],"Team":"Aucune","Magma":false,"Rocket":false,"Aqua":false,"MachineF":false,"MégaCAP":false,"ActiveTeam":false,"Start":false,"Premium":false,"Cânne_A_Pêche":false,"NumDresseur":39,"Pokedollars":0,"Sac":["Marisson (Starter)"],"SSac":[],"LSSac":[],"LSac":[],"GSac":[],"LGSac":[],"NbPokemons":1,"Pokedex":[0],"TempsVote":0,"TempsBcrate":0,"Potion":0,"Famillier":"","XP":0,"Appât":0,"HawlloweenItem":1572275616978,"TempsCatch":0,"Niveau":0,"NiveauP":0,"TempsDailyPoke":0,"TempsInvest":0,"TempsHr":0,"TempsDy":0,"TempsPeche":0,"Quete1":1572275616978,"Quete2":0,"Quete3":0,"Quete4":false,"Quete5":false,"Quete6":false,"SoonC1":[],"SoonC2":[],"SoonN1":0,"SoonN2":0,"SoonN3":0,"SoonNA1":"","SoonNA2":"","SoonO":[0],"SoonFT1":false,"SoonFT2":false,"SoonFT3":true,"SoonFT4":true},"495855787374280734":{"NomDresseur":"Lucas.prcl#4963","Points":12,"Grade":"Dresseur Débutant (0 - 350)","GradeG":"Joueur","BDDTitre":["Joueur"],"Team":"Aucune","Magma":false,"Rocket":false,"Aqua":false,"MachineF":false,"MégaCAP":false,"ActiveTeam":false,"Start":false,"Premium":false,"Cânne_A_Pêche":false,"NumDresseur":6,"Pokedollars":0,"Sac":["Moustillon (Starter)","Héliatronc (Normal)"],"SSac":[],"LSSac":[],"LSac":[],"GSac":[],"LGSac":[],"NbPokemons":2,"Pokedex":[0],"TempsVote":0,"TempsBcrate":0,"Potion":0,"Famillier":"","XP":0,"Appât":0,"HawlloweenItem":1572279792314,"TempsCatch":1572279814403,"Niveau":0,"NiveauP":0,"TempsDailyPoke":0,"TempsInvest":0,"TempsHr":0,"TempsDy":0,"TempsPeche":0,"Quete1":1572279792314,"Quete2":0,"Quete3":0,"Quete4":false,"Quete5":false,"Quete6":false,"SoonC1":[],"SoonC2":[],"SoonN1":0,"SoonN2":0,"SoonN3":0,"SoonNA1":"","SoonNA2":"","SoonO":[0],"SoonFT1":false,"SoonFT2":false,"SoonFT3":true,"SoonFT4":true}}
And i have 6.000 players
6.000 x this
But the array for players advanced is very long
the result for that without the schema looks good
?
yea
And if you patch my problem i cna pay you it's not a problem
Because this bug is very big
good luck neko (you have no idea what you're getting into)
const file = await fetch('https://api.poe.watch/leagues').then(response => response.json());
var LigaListe;
var LeagueName;
var x = 0;
while (x <= file.length)
{
//LeagueName = file[x].name;
LigaListe += x +": "+ file[x].name +"\ ";
x++;
}
message.channel.send("Sorry, the league " + args[0] + " does not exist.\nCurrent Leagues are: \n" + LigaListe);```
Can anyone help me put this string together? It keeps telling me it would not be able to read the property 'name' of undefined but if I put it into console.log it spits the text out perfectly
Use < instead of <=
Your problem is due to it trying to index 4 from the array, even though only 4 results are returned (0-index).
My bot currently manages 73k users, and I'm about to start the rewrite. How do I send a message to all guild owners using the bot or let them know in any way that the bot will be offline?
don't do that
Kinda still is, even for the small number. You could set a temporary status saying it'll be offline
Nor is it nice. Who actually likes receiving DMS from bots?
Oh yes.
I'll change the status for 10-15 mins before doing the rewrite ig.
Cheers
nice that helps @sudden geyser but now I always have "undefined" as first entry in my LigaListe 
when you don't assign it on initialization, it's set as undefined. So, init it as a string
don't hurt me... how?
variable = ""
One message removed from a suspended account.
One message removed from a suspended account.
def test():
print('hello')
Anyone knows why this error is occurring?
python btw ^
I'm going to sound like a noob and avg Joe so please dont judge. I made a bot on DBM and would like to offer it to other people to use but dont have the first clue how to or next step
@thin quartz I made a bot with DBM too. There is a video on how to export it. You do need it to be running so you can't user your normal pc. I use my server pc though you could use something like a Raspberry Pi
Discord Bot Maker bots do not necessarily require the program in order to run. In this video, we quickly go over how to transform your project into a working...
@hoary bramble check the documentation. send_mesages is not defined in Permissions
discordpy?
@earnest phoenix I watched that video! He talks fast but all the videos are really great. I am looking into sending my bot I made on DBM to Vultr which is a VPS but I'm not sure if it will work and/or how to update the bot as I add more commands for resources
@earnest phoenix thank you the assist! Ita comforting knowing another made a bot using DBM
@hoary bramble that's not how that works
init takes in a permission int
function notation of the int returns if it is allowed via lookup
(ie 0b00110011111101111111110001010001)
For updating is SUPER easy, all you have to do is go into the folder Data on the server then delete commands.json and events.json then add the updated updated bot's commands.json and events.json folder to the server.
It's easier then it seams
Oh, let me try that
(I think anyways, going off the source code lol)
yep, worked, tysm 🙂
Np 
By the way, do you know how I could edit a channel's permissions? @night imp
Sorry, I don't use discordpy often
np
Hello
It's most likely latest
this is automatically changed after savings
Im always savings
target="_self"
And its automatically changed to
target="_blank"
After saving
And in preview mode its note changeing
I want those link open in same window it should be scroll down to class without any process or new tab
Hey, I'm trying to make a help command and I'm trying to get the command names from the commands folder. It doesn't return a value though, it just says undefined. I'm just calling it inside a string like this `${names()}` The code I'm using is this ```js
function names() {
fs.readdir("./commands", (err, files) => {
if(err) {
message.channel.send("An error occured while looking for command names. Please try again.")
}
files = files.map(file => `\`${file.slice(0, -3)}\``);
return files.toString();
})
}``` Any help would be appreciated.
Because it is undefined
An i/o operation is not synchronous, your function returns before the readdir finishes
Anyone know how to ssh tunnel a connection so I can connect to the --inspect debugger and connect to it with chrome debugger?
includes examples for command line and putty
depending on what you use for ssh, could be different to set up (i did it in mobaxterm)
Is OVH a good provider?
yeah if you have 💵 💵 💵
It's only £2.99 / month.
With them are you stuck into a 12 month pay period?
No
I can cancel anytime?
Dumb Question, can i just use the <style></style> tag
You can pay monthly
in my long desc
Which is probably the smallest
@fallow spire of course
You'll pay up front for the entire month
Ok
So if you cancel, you still paid for the entire month basically
Yeah I don't always have funding so I just don't want to be stuck into a 12 month thing and then get charged when I can't pay for it.
How would i make my Whole Bot Page in Grey or Something @mossy vine
CSS
find out what classes you need to change with inspect element, and write css rules to color them
Hm ok
How do I leave my bot activity blank in JavaScript
dont set an activity
I tried to do it but it gives ready.js error when it does
What do you think I should do? @mossy vine
just.. dont use setActivity
^ cant you just remove your activity code?
I tried, but it doesn't work.
@quartz kindle
show your code
const moment = require('moment');
const Discord = require('discord.js');
const ayarlar = require('../ayarlar.json');
var prefix = ayarlar.prefix;
module.exports = client => {
console.log(`${client.user.username} ismi ile giriş yapıldı!`);
client.user.setStatus("idle");
//idle = boşta
//dnd = rahatsız etmeyin
//online = çevrimiçi
console.log(` `)
client.user.setActivity(`${prefix}yardım | ${client.guilds.size} sunucu | ${client.guilds.reduce((a, b) => a + b.memberCount, 0).toLocaleString()} Kullanıcıyı`, { type: "LISTENING"});
//LISTENING = DİNLİYOR
//WATCHING = İZLİYOR
//PLAYING = OYNUYOR
console.log(`${client.user.username}: Şu an ` + client.channels.size + ` adet kanala, ` + client.guilds.size + ` adet sunucuya ve ` + client.guilds.reduce((a, b) => a + b.memberCount, 0).toLocaleString() + ` kullanıcıya hizmet veriliyor!`);
};
@quartz kindle
as we told you lol, just remove those
How long does contabo usually take to process an order?
So basically an LFG command for my bot, where whenever someone posts an LFG request, this request will go a specified channel that is subscribed to, for example, using lfg subscribe channelname. Then everytime a user posts an LFG request, that request is sent to all servers that have a subscription channel setup, basically sending a message to tons of servers at once. Would this be considered API abuse?
:arnusfelenemlopottlikeolosemoji:
:arnusfelenemlopottlikeolosemoji:
:arnusfelenemlopottlikeolosemoji:
@earnest phoenix sorta
It took nearly 30 mins for mine @warm marsh
Alright, Do they email or something?
Idk, I got a redirect to paypal and then got an email about my receipt and/or orderid.
Just wait for them then
You should get an email with your login data next
Shouldn't take long as you can see from the timestamps

Alright, I'll keep an eye out for emails. Thank you.
@modest maple Ah, thanks for the answer
So doing what I said above leads to the conclusion that it would be considered API abuse most likely, but is there any proof to back this up, I'm currently looking for some sort of documentation that mentions something about sending the same message to all servers the bot has, although it is an opt-in feature
I mean what do you really need it for
There's a global ratelimit on sending messages
iirc it's about 6 messages every 5 seconds
Pretty sure the global one would be higher than that 👀
@valid frigate It's an LFG thing where when a user posts an LFG request, it sends it to all subscribed channels, in all servers that actually have a subscribed channel
It's 50/10 if it hasn't been changed
depending on how your bot scales it will be constantly hitting that limit
actually
if say 50 ish guilds were actively using a subscription channel that could cause problems
What's LFG
looking for game
^
ah
though
Should search for a different approach
How can i check if the RichEmbed field value has more than 1024 Chartackers?
if you are using a string for something, you can just do a check if string is greater than 1024
Maybe not the ideal solution but It would work
What would be ideal then?
I don't know thats why I said my solution might not be the ideal solution
It seems like the easiest and best way to do it 
Anyone got a bot that automatically changes nicknames based on roles?
Lets say when someone receives the Level 5 role the bot adds "[LEVEL 5]" infront of their name
I mean you could always make your own if you can't find one, or pay someone too :^)
make smh on event if role added
anyone good with node and cheerio? I'm tryna work on a bot with them, and don't have much experience. I'm trying to do some simple webscraping, but cant get it formatted right.
ask your question
gonna need a whole backstory arc first
Yes ?
i not speak english very well
Don't worry
Me too
I created a discord bot but I can't put it online
'-'
thanks
I already did the bot, I did everything right, but for him to be online n just run n? .-.
Which libabry do you use ?
kotlin, i programin in kotlin
I used the same bookstore as loritta
I saw the video tutorials teaching, but he puts online when he runs, my log in discord and everything, appears there in the log, but does not show online
If you send a command, does he responds ?
it does not appear online in the group members list in his video as soon as he starts online, and when I am going to use .buildBlocking, it does not work, from the line error, only get .build from JDABuiler (AccontType .BOT) .setToken (**). BuildBlocking, just .build
that should work, but to begin you should just use .build() instead of buildBlocking
also can you provide a stack trace
looks like this in the log
It's not an error
lol it's not an error
is anyone able to help me
you need to implement logback into your depenency manager
do you know how to hyper link links onto a bot like this https://cdn.discordapp.com/attachments/631947713335918595/638857755377270785/unknown.png
okay
How do you implement this business?
so is it like this
you need to put it in your pom.xml iirc https://mvnrepository.com/artifact/ch.qos.logback/logback-classic
i use gradle so cant help you much
.addfield("Add me to your server") invitelinkhere
???
discord.js
bruh
lmao what
i do know
thanks
yw
He uses JavaScript I think
yeah im aware
.js
@ocean rampart yes
.addfield isn't correct either
no no
js naming conventions would make it look like .addField
i used kotlin
let Sembed = new Discord.RichEmbed()
.setColor(colours.gold)
.setAuthor(`Combot Help`, message.guild.iconURL)
.setThumbnail(bot.user.displayAvatarURL)
.setTimestamp()
.setDescription(`These are the avaliable commands for Combot!\nThe bot prefix is: ${prefix}`)
.addField(`Commands:`, "``help`` ``serverinfo`` ``shutdown`` ``userinfo``")
.setFooter("Combot | Footer", bot.user.displayAvatarURL)
message.channel.send(embed).then(m => m.delete(10000));
message.author.send(Sembed)
}```
thats part of my help command
I wouldn’t copy paste it
also
Use hastebin
variables typically dont start with a capital
pick one
it sends this
.setAuthor(`Help Command!`, message.guild.iconURL) .setColor(colours.redlight) .setDescription(`${message.author.username} check your dms!`)
https://hastebin.com/ when you’re showing code. Sorry for interrupting
most of my commands are from tutorials either from [MenuDocs] or TheSourceCode
i think you should learn a bit more about javascript itself tbh
everyone says that
youll see what you're doing wrong but
Use SoloLearn :pp
but all i would like is to hyperlink something
yes i told you
he literally told you what to do lmao
the way you name variables/capitalize methods shows that you need to study js a little bit
i mean, js doesnt really care about those
yeah i know but a lot of solid code follows the whole lowercase variable naming convention etc
its the tutorials i watched to get the basics
well
anyways, what part didnt you understand? he literally told you the answer
[click me](http://google.com)
Can anyone make a Discord bot for me?
if you pay, sure
How much?
depends on what the bot needs to do
30 bucks /hour
Expensive
ikr
ill do it for $29.99 bucks / hour
I'll do it for $3,000 / hour
Naw. I know people that host for free.
But we won't host it, we will make the bot
lmao

yeah, for $29.98/hour
lol
good question
You asked how much does it cost for someone to make a Discord bot for you
we answered with not-so-serious answers :p
creating a bot takes time, you need to pay your employee that makes the bot for you
the bot you want might already exist on https://top.gg/
ads
#ads!!!
now it's not an ad 😄
Yeah mine pertains to everyone too
omg aD?
its not like its for a specific game
-bots
This user has no bots
sorry something came up, gonna paste my broad question again so someone can see it:
anyone good with node and cheerio? I'm tryna work on a bot with them, and don't have much experience. I'm trying to do some simple webscraping, but cant get it formatted right.
people dont like broad questions here
please be more specific, ie: what have you tried, show your code, etc...
More specifically, I am developing a bot for a hobby that pulls data from a few different websites. The example I am using is: https://www.mtggoldfish.com/deck/2383407#paper
I want to basically output the table data on the page within an embed.
Here is my code so far, that at least pulls the data from the page. I haven't integrated it into an embed yet because I am not sure exactly how to :
var request = require('request');
var cheerio = require('cheerio');
//The page I am pulling from
let string = ""
var url = 'https://www.mtggoldfish.com/deck/2383407#paper';
request(url, (function(){ return function(err, resp, body) {
//Outputs the url to console
console.log(url);
$ = cheerio.load(body);
//Specific place I am trying to pull data from
//$('#tab-paper').each(function() {
$('#tab-paper .deck-view-deck-table tr').each(function(header) {
//For each specific element in the table
$(this).find('td').each(function() {
/*Log the data (NOTE: the output is not desirable, as this was used
* in an example I read. I want the data outputted in a usable format)
*
* It would be even better if i could push this to an object like:
* var object = {
* Commander: [
* {
* name: "Freyalise, Llanowar's Fury",
* quantity: 1,
* price: 9.95
* }
* ]
* }
*
*/
console.log($(this).text().trim().replace(/\s+/g, '_').split('_'));
});
});
}})());
Apologies for the long post, just wanted to give specific info
Let me know if you want the current console output.
Yes, post the output
it is very long so ill post the first few lines
https://www.mtggoldfish.com/deck/2383407#paper
[ 'Commander' ]
[ '1' ]
[ 'Freyalise,', 'Llanowar\'s', 'Fury' ]
[ '' ]
[ '9.95' ]
[ 'Creatures', '(30)' ]
[ '1' ]
[ 'Arbor', 'Elf' ]
[ '' ]
[ '0.35' ]
[ '1' ]
[ 'Elvish', 'Mystic' ]
[ '' ]
[ '0.24' ]
[ '1' ]
[ 'Hungering', 'Hydra' ]
[ '' ]
[ '1.00' ]
[ '1' ]
[ 'Llanowar', 'Elves' ]
[ '' ]
[ '0.00' ]
[ '1' ]
[ 'Mistcutter', 'Hydra' ]
[ '' ]
[ '1.37' ]
[ '1' ]
[ 'Druid', 'of', 'the', 'Cowl' ]
[ '' ]
[ '0.16' ]
[ '1' ]
[ 'Elvish', 'Visionary' ]
[ '' ]
[ '0.18' ]
[ '1' ]
[ 'Gyre', 'Sage' ]
[ '' ]
[ '1.75' ]
[ '1' ]
[ 'Leafkin', 'Druid' ]
[ '' ]
[ '0.18' ]
[ '1' ]
[ 'Paradise', 'Druid' ]
[ '' ]
[ '0.49' ]
[ '1' ]
[ 'Priest', 'of', 'Titania' ]
[ '' ]
[ '4.04' ]
[ '1' ]
[ 'Elvish', 'Archdruid' ]
[ '' ]
[ '2.05' ]
[ '1' ]
[ 'Evolution', 'Sage' ]
[ '' ]
[ '0.81' ]
[ '1' ]
[ 'Marwyn,', 'the', 'Nurturer' ]
[ '' ]
[ '0.55' ]
[ '1' ]
[ 'Nissa,', 'Vastwood', 'Seer' ]
[ '' ]
[ '10.33' ]
[ '1' ]
[ 'Omnath,', 'Locus', 'of', 'Mana' ]
[ '' ]
[ '20.95' ]
[ '1' ]
- many more lines of data
(of the same format
[<quantity>]
[<name>]
['']
[<price>]
I guess getting this data in a reasonable/useable format. I tried to push the data to an array but it is in a forEach, meaning my array has many repeats. I havent worked too much with node, but it would be optimal to push it to an array or create an object (like shown in comments in my code above). That way I can use it in discord.
You have two loops, one over rows and another over cells
You can initialize an empty object before those
Then at the start of the first loop you add a key to rhe object
With some information from that row
Then at the second loop, you populate that key with the respective fields
See if those cells contain any classes or attributes you can use to identify which cell represents what value
If not, see if cheerio has a loop which provides an index
Otherwise you can set a variable to use as a counter
To help you keep track of what is what
Having an index would be useful, but the data I am pulling can vary in length, so will have to find a way around that.
Which length is variable? The amount of cells per row?
In the table, there will be a varying amount of elements (each element has a number, name and price). for this site, it can vary as low as 60 to 100 elements.
The index im refering would be to help identify the cell, for example ```js
if(index === 0) { object.name = this.text() }
else if (index === 1 ) { object.price = this.text() }
// etc
(Pseudo code)
lemme try that
And the index should reset every time you move to the next row
But if you have classes or attributes in those cells that can identify them , you wont need an index
Anyhow, its just a matter of how to organize your data, it should be hard, experiment a bit and see
Im off to bed, see ya
okay. your information was very useful. there isn't a specific index, but the table does include seperate classes for the prices and quantity which can be useful. thanks again and good night 🙂
making good headway. Thanks tim 🙂
help
dont know why this is happening
tried doing everything
including pip3 install --user aiohttp
Are you sure you are running your bot under the same env var as the one you install aiohttp on
So, im trying to make a custom logchannel system, rn i only know how to make it with the channel name. But how can i do it that it also work when the Channel gets Mentioned?
im using discord.js
how to use animated emojis with a bot?
?
just do :emojiname: ?
@fallow spire
But how to find emoji id
@fallow spire
<a:name:id>
You can send the emoji somewhere and add an escape character in front \ to get them easily
But I don't think you can do that on animated emojis if you're not nitro and not able to use them
uhh
You can probably get a bot to list all emojis with their names/ids
idk what else you could rly do 🤷
thx u
What does UnhandledPromise RejectionWarning mean?
a promise rejected and you didnt handle it properly. its just a warning, but the promise rejected regardless, so it might be worth reading the full output to find the actual cause of the rejection
I want to do a emoji command : "bk_emoji :emoji:" --> [the emoji]. How can I make it?
@earnest phoenix i just told you
I need a different command : "bk_react :emoji:" --> react with the emoji
but I need emoji Id
other request : how to make a "wait" function on javascript?
use setTimeout (and maybe a promise or callback)
can somebody explain me what happens?
how to react to the last message sent ih the channel?
Look at the docs
One message removed from a suspended account.
you arent passing your client to your eval command
One message removed from a suspended account.
client = no
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
User is not defined
okay you are doing it completely wrong
One message removed from a suspended account.
One message removed from a suspended account.
your bot is open source right? i can show you how to do it
One message removed from a suspended account.
One message removed from a suspended account.
link pls
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
DVSAEZI either you're not passing your client correctly or you don't pass it at all
like so, this maybe
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
you assign client as a local variable, where this.c was never assigned it seems
One message removed from a suspended account.
ah im blind
One message removed from a suspended account.
One message removed from a suspended account.
i said im blind 😩
One message removed from a suspended account.
Guys, i tryna setting up my cluster on mongoDB, when i put my Application Acces stuff in my Database it gives me that Error:
(node:12007) UnhandledPromiseRejectionWarning: MongoNetworkError: failed to connect to server [cluster0-shard-00-00-kmwto.mongodb.net:27017] on first connect [MongoNetworkError: write EPIPE]
It says clearly it, it cant connect to the db.
But why
maybe wrong port or pass
@sage bobcat yeah, you are changing client to this.c which is undefined
One message removed from a suspended account.
just remove it
remove that line
@restive furnace well pass is right, also anyone can acces it
One message removed from a suspended account.
One message removed from a suspended account.
maybe then port or address is wrong then.
anyone can access it
Is it possible for bots to use custom emotes from a server A, on another server B? Im wondering how the bot "free smiley dealer" does it https://top.gg/bot/475418097990500362
One message removed from a suspended account.
Huh i use now my Old Database and everything works
that's pretty cool
@sage bobcat git fetch or git pull i never know which
they just have access to global emojis
they can use gif emotes too, right ?
bots hoarding all the nitro
animated emojis, yes
yes
isn't that basically what nitro is? global emotes and gif emojis
no
was
2 years ago
Whats best db: sqlite / mongo / mysql
sqlite for small scale
postgresql for big scale
@restive furnace depends on your experience and use case
okay, thx for info
isnt mongo pretty good at scaling too?
fax
this tbh
but that makes it really easy to use
Wait, what means like big scale, so big scale = over 2,500 guilds and small scale = less than 2,500 guilds
anything that constantly needs to read and write to a database
you can have 2.5k guilds but if you have low activity you can run off of sqlite
k
One message removed from a suspended account.
One message removed from a suspended account.
@sage bobcat show code
One message removed from a suspended account.
One message removed from a suspended account.
client has to be in the scope of your eval function.
it is
Clearly...
where did dv send code 
it's a bit up there: https://github.com/DV54321/FarmCord/blob/master/cmds/owner/eval.js
problem is they set the local var as undefined
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
It looks kinda like my eval command, but yours is much cleaner, mine is 11 month old code that I never improved on
This user has no bots
How do I invite my bot here 
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
So I currently have a website that I need to make for a school assignment I have a method which has a grid. That grid has 3 main content areas and 2 filler ones. Now this works fine. But when I need to add another grid below it that hides/unhides divs on click it will work fine if I go from left to rigth however the placement is all over the place when going right to left.
Is there anyway to make it so that they just open up below the box they're supposed to?
#indexHiddenTabsContainer {
width: 95%;
margin: 5% auto 0 auto;
display: grid;
grid-template-columns: 30% 5% 30% 5% 30%;
grid-template-areas: "indexHiddenTabOne" "indexEmptyThree"
"indexHiddenTabTwo" "indexEmptyFour" "indexHiddenTabThree";
}
<!-- Verborgen informatie tabs -->
<div id="indexHiddenTabsContainer">
<div class="indexHiddenTabs" id="indexHiddenTabOne">
</div>
<div id="indexEmptyThree"></div>
<div class="indexHiddenTabs" id="indexHiddenTabTwo">
</div>
<div id="indexEmptyFour"></div>
<div class="indexHiddenTabs" id="indexHiddenTabThree">
</div>
</div>
When selecting left to right
https://cdn.discordapp.com/attachments/540817942577676301/639115639939792896/unknown.png
When selecting right and middle
https://cdn.discordapp.com/attachments/540817942577676301/639115834291126272/unknown.png
(Just use a button with an onclick event to unhide them)
@weak parrot Nani German Word in 2nd HTML Code?!
No that's Dutch lmao
German aswell
You are only allowed to be a Timo if you are Dutch
Ahw shit
I didn't notice the dutch in the HTML, but I saw the dutch words in the screenshots
How can i detect if an Message Got Edited? What is the Event Called?
In Discord4J it is a MessageUpdateEvent
I guess it's something similar for other libraries and languages
for the guildBanAdd Event, How can i read the Reason?
You're using discord.js?
There's also fetch ban
Don't know if it would be more efficient in any way
But that'll give you just the user & reason
While the audit log will also contain the user that banned them
To fetch a ban you need the BAN_MEMBERS permission
to get the audit logs you need the VIEW_AUDIT_LOG permission
you need to download it
How would i put my token in .env?
token=mytoken?
GUILD mean that u are the creator ?
Wym
@quartz kindle I was able to get the code working! Thanks for your help last night 🙂
@lunar crystal what do you mean?
A guild is a discord server
There is no permission with the name GUILD
guild.owner is the owner object I'm pretty sure in d.js
@weak parrot if you still need help with that project ask Mo2 cuz he does alot of HTML and JS webpage deving
<#id>
guys how can the bot not allow the user to use the commands if he didn't voted to the bot on top.gg website ?
how do I open this in visual studio code? saw it from a video but didnt understand the keys he pressed
the terminal tab
@glad leaf drag upwards from the bottom of the code screen
Is it possible to create a new command with a command?
depends on how you handle commands
What do you mean?
is it hardcoded if else command handling? no, you can't
are you using files? yes, you can
are you using a module system (seen in discord.net, qmmands etc.)? yes
how can i make my bot only usable by me
by owners
do i need to make every single command check for role
@glad leaf wait i will send it you via pm
As soon as a message is received check if the author is the bot owner, do it at the same location where you check if the author is a bot
do i just put this in the index
Are u useing files?
Okay then
if(command === "NAME_HERE"){
if (message.author.id === "YOUR ID") {
//command
}
}
@glad leaf
can I make it so its based with a role other than the author?
Wait
if(command === "NAME_HERE"){
if(!message.member.permissions.has("PERMS_HERE")) return message.reply("MESSAGE_HERE")
//command
}

hm?
where do i put that exacly tayron
Spoonfeed
yes
if you want it for ALL the commands then im sure you can find a way to do it better ^^
does anyone know why my bot replies twice when i do a command
fixed it
nvm didnt fix it
NVM
GOT IT
I'm using JDA
Sweet, gimme a sec
i think i can't get the user by it's id because he's not in the server
yup, i thinks it's impossible
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
DELETE/guilds/{guild.id}/bans/{user.id}
Just let the mod pass in the user ID and pass it straight to that as it takes the ID
Don't bother fetching the user
Cos you can't, as you've seen
Otherwise devs would find a way to game the system and randomly message generated IDs
k thanks !
NP, good luck!
;)
https://bot.wearebounce.net/f/q7jUibdQ.png Am I being dumb or something?
you have a syntax error earlier in the code
also, users don't have permissions. you want message.member
can someone make me a code like this
sure, if you're willing to pay
@snow urchin not getting any syntax errors on my end from that
would make sure that code is what's currently running
only thing popping out to me is you reassigning a constant
^^^^^^^
i just grabbed the poll command file and put it in my commands folder
is that what i have to do or do i have to host a brand new bot with everything poll bot has?
or you can just code it yourself
@glad leaf literally all you have to do is git clone https://gitlab.com/sdfsdfsdf1234/PollBot then edit the config files to your needs
Do u know how to make an embed in server greeting msg ?
yes
on a scale of pass to smash, its a smash
Bot avatar 100
I made it in paint.
if this is intentionally bad then it needs more effort
Is it possible to upload images to Discord with just the image URI data?
I’m not quite satisfied with having to download any external image I want to upload as a file
I dont believe so
ok, thanks
how come when Im listening for the event on_member_update, the nickname is returning None sometimes on member.nick of the after member object
You can link to an external image in an embed and it will look like an uploaded image @high anchor
@manic basalt nickname reset
Condition after.name == after.display_name would also apply
Hey
If I have a website, and I want to communicate to it through the bot, how would I do that
api
wat
theres a few ways to do it
depends on your setup
for example, my website is built directly into the bot
But before i've also had an api that I used for communication between the website server and the bot
what do you use for your bot? @empty owl
as-in: language
Ok
how come when i am in the preview of editing the text is the size i want it, but when i summit it it changes?
Can we not put emojis inside inline embed fields anymore?
For some reason this aint working anymore https://i.imgur.com/dQocps6.png
that is the URL to an emoji, it's not the emoji itself
but it works in titles? https://i.imgur.com/t84V2m0.png
wdym its the same string for both of these screenshots
Used to work 🤔
Shouldn't an emoji look like <:name:id> ?
They are like tht
maybe you can only use the unicode emojis because i see that one of the offline people has an emoji in the name
unicode emojis and custom emojis are handles differently
it is also possible to have unicode emojis in channel names, while you cant have custom emojis in channel names
Yes, I jus dont know how to make emojis appear in field values
Apparently its different now
They appear in field names but not values
I read a few days ago in the Discord4J or official discord api that there are some restrictions to what you can use in the different sections of embeded messages
But Im kinda drunk right now, so i dont feel like looking for it
I think it wasn't about emojis, but about links that looks like [text](url)
But if those things are limited then emojis might also be limited
hmmmmm
I wonder why they would disallow it in field values but not in field names
Either way its a pain in the butt
Nevermind, they do allow it
I just dont know why my string specifically isn't working
perhaps it gets disabled with markdown
that's so weird https://i.imgur.com/uswyEdh.png
ok so its just that one of the emojis was spelled wrong
nice
fricked all of them up in the process
There are indeed restrictions on what works and what doesn't in embeds
Important to notice is that it's also dependant on your system
And probably also the version of your discord
For example: my old android phone with an outdated discord won't display any markdown anywhere but in field values/descriptions
It would probably be best for you to try and avoid using special markdown/emotes in those places
pulled off a bruh moment when i figured that out lmao
So that even outdated systems can still see things the way they should
And yes, if a message contains just 1 invalid emote, it won't show any of them
Not just embeds have that
lol markdown is the essence of embed formatting, older versions support it
discord is built on electron so backwards compatibility is a thing
I'd love to believe you but as long as my mobile device is showing all emotes in there as name:id I'm gonna have to say you're wrong
On top of that
"discord is built on electron so backwards compatibility is a thing"
I literally can't view the news channels on my mobile
They don't exist
so backwards compatibility seems to be a big joke there
I think this is a dumb question but is it allowed to create a trade vote bot, for exemple if mr A vote for the bot, the owner of the bot vote for mr A bot ?
Idk if there is a rule about that, but voting cannot be automated, you both would have to manually vote for each others bots
Yeas 😁
henlo
I have a problem
my ${client.guilds.size} outputs 9 (normal) in the bot statuts, but on other command the output is 0. Why?
Another command in the same bot? Is the bot sharded?
Are you caching it somewhere?
I think this is the problem
const Client = require("../client/Client"); const client = new Client();
I start a new client each time I want to know something about client
but how tu re-use an non-empty client?
Is the command in an exported file?
``client.on("ready", () => {
console.log(Logged in as ${client.user.tag}!);
client.user.setActivity(beta v0.4 :) | bk_help | ${client.guilds.size} servers);
});``
this works fine in index.js
yes
eval.js is not index.js
Then pass the client to the file as an argument
wat do u mean?
How do you run the file?
wich file
The eval file
oh
See
client.on("message", async message => { const args = message.content.slice(3).split(" ") const commandName = args.shift().toLowerCase() const command = client.commands.get(commandName) if (message.author.bot) return; if (!message.content.startsWith(prefix)) return; try { command.execute(message); } catch (error) { console.error(error); } });
like this
hm
That will send the client as an argument
To the eval file
Another way, since youre alredy sendibg the message, is ti get the client from the message
In your eval file let client = message.client
All messages contain the original client reference
You have to change the argumets
it works
If you change it to client,message on one side, you have to change it to client,message on the other side too
If you do ut that way, yes
How to get nitro emojis ID without Discord nitro?
ask someone wit nitro @earnest phoenix
@earnest phoenix one way that I know of doing it is by going on the browser version of discord and inspecting the page that has the emoji you want the ID for you can usually find the ID in there
Yeah same process go to the browser (google chrome) version on your android make sure you have it set to view as desktop and then add view-source: to the begging of the link to bring up the page inspect on Android
@earnest phoenix example (notice the link at the top)
or you could use an eval command and list all the ids
which is like 30x less painful
That works to 😁
or someone with nitro could help you as well
I just like out sourcing my options
@earnest phoenix maybe too late but you could have also used message, client instead
That way you'd only have to change it in the ones where you actually want to use client
Passing extra arguments in javascript doesn't throw any errors so it would still work for your other commands
The order is what matters basically
client,message works too
const db = require ('quick.db')
module.exports = {
config: {
name: "deposit",
aliases: ["dep"]
},
run: async (bot, message, args) => {
let toDeposit = args[0];
if(isNaN(toDeposit)) {
return message.channel.send("That's not a Number")
}
let embed = new RichEmbed()
.setDescription(`You deposited ${toDeposit} Coins to your Bank.`)
message.channel.send(embed)
db.add(`bank_${message.author.id}`, args[0])
db.subtract(`money_${message.author.id}`, toDeposit)
}
}```
Error: Error: .add() data is not a number
help ne
me

How many letters are there in a nitro gift
More than 1
I know that
#memes-and-media this is development
I want to add Bot I am getting Error?
What error?
@fallow spire Number(args[0])
yes
Why Number?
to convert it to a number
Okay... But at my Normal Coin System i only have
db.add(money_${message.author.id}, args[0]
if its working then use that
okkkkk
@grizzled raven i hate how that applies to so many questions in this channel
just save the image and spawn it every hour as a reminder
I swear people use this channel as a google search bar
Lmao
@amber fractal javascript setInterval
it's because google search allows up to 120* chars for a query, copypasting your erros here without reading them is more effective :wesmart:
wait errors are supposed to be read?
(maybe we should stop shitposting in development lmao)
no, yes
@grizzled raven ty
@grizzled raven use https://tryitands.ee
Lmao
@loud salmon i was looking for the full video lol
i will be using that
swipe
although, the image gets right to the point
xd
so does the vid thumbnail
Do Canvas work on glitch?
Yes
how can i add a custom background to this
Html (js and css too, if you want it better)
Same
where do you host the bot? @hushed dirge
glitch
Heroku
thats the long description
i know
you cant use js in there (unless you are a certified dev)
^
your hosting provider is completely irrelevant to this question
so i cant add custom bg ?
figure out class names with inspect element and write css in your long description between <style> tags
and what is this ?
widget
how to add it ?
add it where
to long description
a widget.. it literally gives you code to copy
copy the html code
ok
top ?
wdym
i like spoopy memer description how to make like it
whats the class of the menu page? in the html code?
does it not render if you save it either?
what is the hex of dark yellow
google @hushed dirge
saying stuff like "helpppppppp" just mskes people not want to help you
you do that stuff with css google it to learn more
bro i dont know anything about css
idk much about css
-bots 102845358677176320
@loud salmon your bot name ?
your bot name
you will find it
on that page
just use my user id
instead of
UserIdHere
@vernal willow no
bad
he needs to learn
oh sorry
😤
your bot's description is simple
have you seen spoopy memer's description
uh yea, why?
Do someone know how to create an exp system ?
i tried and it worked but when i restarted the bot, all the exp points were gone
FOREVER
because you need a database
you can't store data into variables (in memory) and expect them to be saved
its realistic @loud salmon
Is there a max messages cleared for a clear command? I don't want to be breaking Discords API
@earnest phoenix the docs show this https://discordapp.com/developers/docs/resources/channel#bulk-delete-messages
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
Thanks
How can I eat pizza with a discord bot
like use a command to send an API post to my raspberry pi which executes code to activate a survo
and feed me pizza
so I don't need to use my hand
i don't think you can eat a pizza with a discord b-
that isn't related to a discord bot
I just gotta know how to setup the post endpoint on my pi, I got the survo stuff done
yeah it is, because the !feedme command is through discord

have it connect through a webserver with an api and have the bot listen with that api for the command and do the action and have the bot send the command through the api to the webserver, then have the webserver transfer the data to your raspberry pi
in userinfo command, how can I show when the user joined Discord / the server?
bot in js
Member.joinedAt
joinedAt is already a date
Ah yes,
patched, sry
what
how is it possible for a few guilds to be unresponsive even though the shard is online?
discord outages cause guilds to be unavailable
but i restarted all shards and the offline guilds became responsive again
Hi, I have a "magik" command that I copied from the open source of the esmBot bot, but I need to know how to do it faster, since it takes a long time and, from what I see, it gives the same result as vexera, but vexera takes nothing of time.
this is my code
this is my code
else if(command == "magiktest"){
let miembro = message.mentions.users.first();
const image = miembro.avatarURL;
if (image !== undefined) {
gm(request(image)).resize(800, 800)
.out("-liquid-rescale", "400x400")
.out("-liquid-rescale", "1200x1200").stream((error, stdout) => {
if (error) throw new Error(error);
message.channel.send({
files: [{
attachment: stdout,
name: "magik.png"
}]
});
});
}
}



