#development
1 messages · Page 450 of 1
discordjs recommends this one i think https://www.npmjs.com/package/ffmpeg-binaries
To use this library requires that ffmpeg is already installed (including all necessary encoding libraries like libmp3lame or libx264)
ThatTonybo - Today at 9:32 PM
ThatTonybo :: Today at 10:55 AM
It's fine, fixed it myself.
🤔
lol
can anyone help me with my play command. when ever i play a song and it ends and try to play another song it says add to queue instead of playing the song can anyone help me?
heres the code:https://hastebin.com/egerexofez.js
works rn for me
it can break time to time with YT as noted in there package
I'd rather make my own player
whats the problem rax?
everyone used discord.js for their bot?
im using discord.js yes
json is unreliable for such things
depends on how you use it
I have jsonfile
my bot uses json
oh for that system should use a db
db?
if your money system is very simple u can use jsob
json*
oh yea
but i wouldn't recommend it
I have a db
but its a json db
inside the dir
uh
¯_(ツ)_/¯
you wot
write locks
db's are pretty easy to rig
some hosting platforms even provide a lil weak one
the trick with a json database is to limit i/o operations as much as possible, for example, when your bot starts, load the entire file into memory and keep it there and do transactions in memory. only save to json when you need to save new information, and even then if that happens many times, put it in a timer so it only does so every once in a while
the data isn't writing to the json file
and always always keep json backups
show code?
ok
Are you using node
ignore the messiness
client.on('message', async message => {
const prefix = jsonfile.readFileSync("memory/coins.json")[message.author.id]
if (message.content.startsWith("snipers beg")) {
let prefixNew = 400
try {
let res = jsonfile.readFileSync("memory/coins.json");
res[message.guild.id] = prefixNew;
jsonfile.writeFileSync("memory/coins.json", res);
message.channel.send("Coins successfully changed!");
} catch (e) {
message.channel.send("An error has occured.")
}
}
if (message.content === "snipers coins") {
message.channel.send(jsonfile.readFileSync("memory/coins.json")[message.author.id])
}
}
);
also the money is set to 400 at the moment
what's jsonfile?
see thats a bad practice right there
jsonfile is a lil module that makes working with json ezy
is that a fs variable
oh
idk why its not writing
Well i havent heard of it before
you're doing 4 disk operations in that code
I have the exact same thing for prefixes
dont do that ever
yes
read file is a disk op
do it like this
If your bot is small
Shouldn't hurt much
my bot is tiny
no i meab
How many servers use it
14
oof

are you running on localhost
no
vps
scale doesn't matter, you should always aim for the most performant code
hm
best code now means less re factoring later
^
welp
idk how to do this database thing
I like me some good code but for small bots perfection is not rly needed
like i jsut had to re write my entire bot due to lib having mem leaks
they add up thou
yes
whats a good free database?
I'd recommend using fs to write to json
not whatever lib ur using
lol
yee that's the same way of thinking than "i don't need to prepare about sharding now, my bot is too small" but then when you need to do it you do twice the work you would have done if you had prepared for it right away
mysql is best imo
@earnest phoenix do something like this (dont copy and paste, read to understand whats going on and why)
const coins = jsonfile.readFileSync("memory/coins.json") //load file once
client.on('message', async message => {
let prefix = coins[prefix]
if (message.content.startsWith("snipers beg")) {
let prefixNew = 400
try {
coins[message.guild.id] = prefixNew;
save(coins);
message.channel.send("Coins successfully changed!");
} catch (e) {
message.channel.send("An error has occured.")
}
}
if (message.content === "snipers coins") {
message.channel.send(coins[message.author.id])
}
}
);
function save() {
code to save file only when you need to
}```
ok
basically you load the json file once, change it and save it
ill look at it thoroughly
If u need help just say so 
also, always make backups of json files, if you do anything wrong, you will lose everything because node will save an empty json if the json data has an error
so the save function would be part of what is in my current script?
I'm not an expert but i like to help
the saving part
Rip json
yes, you can make a separate save function to write to disk, and call it only when the coins object is changed
this way the database is in memory, and the json file is only used for persistence, like a backup of the memory
so the json file will always be opened in memory basically
am i correct
and perform actions when needed
not the file itself, but the contents of the file yes
shouldn't it be let prefix = coins[message.author.id]?
yea yea yea ik
also i have a quick question
how would i do a regexp for removing white spaces?
i can do a case insensitive regexp
but i want to remove whitespaces
all whitespaces or only excessive white spaces?
all
nice, cuz I'm trying to do a mongodb query that searches for data and it's easier to make sone regexps for it
but basically use the whitespace selector and the /g flag to target all instances
and replace all with nothing
Cool
const coins = jsonfile.readFileSync("memory/coins.json")
client.on('message', async message => {
let prefix = coins[message.author.id]
if (message.content.startsWith("snipers beg")) {
let prefixNew = 400
try {
coins[message.guild.id] = prefixNew;
save(coins);
message.channel.send("Coins successfully changed!");
} catch (e) {
message.channel.send("An error has occured.")
}
}
if (message.content === "snipers coins") {
message.channel.send(coins[message.author.id])
}
}
);
function save() {
jsonfile.writeFileSync("memory/coins.json", coins);
}
this look any better?
yeah, looks good
of wait
function save(coins)
else the coins inside the function will be undefined
ok
wait
so
function save(coins) {
jsonfile.writeFileSync("memory/coins.json", coins);
}
?
yes
any error?
found
the problem I think
lemme see if its fixed
ayy
thanks guys
Good luck
now I just need to make it so that it sets the users coins to 0 if they don't have any data in the json file
else when they type snipers coins it doesn't send a message
wait
I think ik how
alright, remember to be careful with your json files and always keep backups
i've had my fair share of my bot crashing and finding myself with empty json files
lmao
sucks xd
that's why databases are safer for these tasks
if something goes wrong at least the entire table won't be erased
Lol
so I just save the file like once a day?
or auto backups?
yeah, i'll switch to a real db eventually, but for now json is fine. i made a function to save a backup copy and to load from the copy in case the json breaks
cool
you can set your bot to auto back it up i believe
yes
then if it detects all the data changing to 0 or something then it will stop backing up
idk
¯_(ツ)_/¯
You mean when it crashes
yea
oof
if it does crash your data may be gone
I'm stuck
That's the risk
if the json is empty, the json loading function should return an error
because even an empty json needs to contain {} to be compatible with json
and a broken json doesnt
xD
yes
ok
math functions are with capital M
Math.random()
js is awesome because you can literally press F12 in any browser and test js code directly in the console
Math.Random always returns a number between 0 and 1
oh
how do I get between22 and 30 fro m random between 0 and 1
so I need to then times it?
yes
Tom trying to end the world
tru
it gave infinity XD
how do i return a number smaller than 1 but bigger than 2 using js

Math.random(0,1) * 100
seems to work
no need for the 0,1
ok
smaller than 1 but bigger than 2?
lmao
It was a joke
so I don't have those nasty numbers
nodemon is pretty useful tho
Finally decided to install it
you can use parseInt() to remove decimals
or toFixed(), but toFixed turns it into a string
yeah a string of numbers
most math functions will work on strings, except +
"10" - "5" = 5
"10" + "5" = "105"
xD
where do I put parseInt()?
also i need some "help" with async
when i'm sending the message?
thats cos - will coerce types
parseInt(number)
^
let number = Math.random() * 100
let prefixNew = parseInt(number)
?
that?
no need to parse it
thats a trick people use to convert strings to numbers, they do something like string*1 because its shorter than Number() or parseInt()
not really lmao
send it away
k
if u wanna remove decimals use bitwise operators
fastest method
or math.floor
parseint is terrible
var init = async () => {
var app = new hapi.Server()
app.connection({
"host": "localhost",
"port": 3000
})
await app.start()
mongoose.connect(url, {
"useNewUrlParser": true
})
dbo = mongoose.connection
loadRoutes(app)
}
init()```
its working
but yeah
im new to async
hey if it works it works
ik this is easy to do
but my brain isn't working rn
its not adding the coins on
just changing the coins
and yeah, Tom is right, Math.floor/round/ceil are much faster than parseInt
I need help
i forgot about those for a moment
send code
my brain isn't working
ik this is really easy
but my brain is being stupid af
ik why this is happening
I just dk how to fix it
from your previous code let prefixNew = 400 will always replace the value
function save(coins) {
jsonfile.writeFileSync("memory/coins.json", coins);
}
``` is changing the coins, not adding on
ah
you're updating the values to 400, not adding 400
i think
yes
but I don't remember how to add the values together
you'd have to do coins + 400 or smth
+=
and save it
yeah +=
no
my script is different now
const coins = jsonfile.readFileSync("memory/coins.json")
client.on('message', async message => {
const currentprefix = jsonfile.readFileSync("memory/prefix.json")[message.guild.id]
let prefix = coins[message.author.id]
if (message.content.startsWith(currentprefix + "beg")) {
let number = Math.random() * 100
let prefixNew = parseInt(number)
try {
coins[message.author.id] = prefixNew;
save(coins);
message.channel.send("Here, have " + prefixNew + " coins!");
} catch (e) {
message.channel.send("An error has occured.")
}
}
if (message.content === currentprefix + "coins") {
message.channel.send('You have ' + (coins[message.author.id]) + ' coins (If it says undefined it means you have no coins)')
}
}
);
function save(coins) {
jsonfile.writeFileSync("memory/coins.json", coins);
}
idk what part to change
well
coins[message.author.id] = value
coins[message.author.id] = prefixNew; // replaces value with new value
lmao
read the file once when you load the bot, and save it whnev you need. dont read the file every time pls
ignore that lol
anyway
im still confused
what you want is coins[message.author.id] = prefix + prefixNew;
ok
you get the old value, and save it while adding the new value to it
or if you want to make it more readable:
let final = prefix + prefixNew;
coins[message.author.id] = final;
or something like that
go slep
actually, its 1am here, i need sleep
go figure it on your own lmao
you can do it
just eat some snickers
and youre good to go
you'll be typing js so fast and so well

THIS
ISN'T WORKING
Just use a database..
It's much easier
but thats not the problem
its the adding system
if you use a database none of that'll be a problem
It's super easy to increment integers
So making a money system is a piece of cake
You can make your own in like what 2 hours
Without having to worry about it ever again pretty much
but I wanna get this right
😄
I got it working
nice!
I can't get the bot to check if a member has a role on another guild. The bot is on both servers.
Here is the code I wrote
var accepted = false
const checkguild = client.guilds.get("id-hidden-is-correct");
const acceptedRole = checkguild.roles.get("id-hidden-is-correct");
if(message.member.roles.has(acceptedRole)){
accepted = true
message.channel.send("Accepted!").catch(error => console.log);
} else if(!message.member.roles.has(acceptedRole)){
accepted = false
message.channel.send("Denied!").catch(error => console.log);
};```
I am really confused
It says Denied, even if you have the role every time
The command should check the author, no args or mentions for other users
discord.js
no bot commands here
Does anyone know how to build a url for an image stored on the server the bot is hosted on? im trying to create an embed (with discordjs) that has a thumbnail, but its asking for a url.. a filepath doesn't work
// Send an embed with a local image inside
channel.send('This is an embed', {
embed: {
thumbnail: {
url: 'attachment://file.jpg'
}
},
files: [{
attachment: 'entire/path/to/file.jpg',
name: 'file.jpg'
}]
})
.then(console.log)
.catch(console.error);
from https://discord.js.org/#/docs/main/master/class/TextChannel?scrollTo=send
literally in the examples
upload your image to a file website, you can make one your own pretty easy. Just upload your image there and use the url
i tried the above example but it just spits out the image outside of the embed instead of inside
file website as in tinypic, etc?
i have about 500 images
yes
wouldn't be fun
try Google Drive or something
hmm
then just rightclick the image, and click "Copy Image Address"
^^
No one answered my question as well anyway
I assume no one knows how to do it anyway lol
help-me?
how do I have a subdomain on the site?
Hey sorry to be a pain but does anyone know how to integrate html into your bot like MEE6 or Saftey Jim does to give it a slick look when it says something?
any examples that you might be referring to?
oh those are called embeds
May I know what coding language/ discord library that you are using so I can give you some useful resources?
python3
oh I see
Not sure if this would help, https://cog-creators.github.io/discord-embed-sandbox/ and https://stackoverflow.com/questions/44862112/how-can-i-send-an-embed-via-my-discord-bot-w-python
thanks I will have a look anyways. What language do you use for your bots? Java?
I mostly use NodeJS so I don't think I can go down with the details for python, yeah but I'll try my best to help
thats fine was just curious thats all
@fluid basin thanks alot it worked
indeed @wild tide
Hmm nice choice. Linux mint
how do make a bot?
thx hooh waaw
k im bringin that back
how to sprint
Move to #memes-and-media
Pkay
why can i type here
anyone know why i'm getting this error? i restarted my vps and now i get this whenever i try to start my bot: https://derpyenterprises.org/tkkc0f.jpg
Nope
I feel like making a bot...
Hi
ok found the error
Lurn dude
I want to, but IDK how
latest node goes oof btw
in discord.net, whats the task used to put a "rating" (like a rate this 1-5) in an embed, and you choose which number it is
Called.... Um.... Aha! PastelBot!
?
original name i like
Can I get some help with a library?
Which one?
eris
Hmm
hmm
What do you need help with Eris?
get the amount of text/voice channels a server has
There are multiple ways to fetch that
:GWfroggyBlobWokeThink:
Idk stuff bout eris
But I'll try
Idk
I'm still learning 😂
IDK tbh roman
@earnest phoenix it's hard
ehh
what
what
What??
ill just ask here again later
Lol ok
If someone knew and had a will to help, they would already be here and helping
Idk so ye sorry
I have as well
Okay, now my question:
Is it better if I open SQLite3 connection upon bot start or should I consider opening the connection when the command is used?
Hmm
Ye
#Lazy :^)
@earnest phoenix Guild.channels.filter(c => c.type === 2).length
dont forget the msg.guild part
...
Google's answer
Nao, Guild with a capital G means a guild object
But he wanted to get a guild object from a message
...
It's still a guild object
Yes
Hmhm
But i just thought it's better to clarify
Tru
mets
Yeah?
2 is?
2 is Guild_Voice
Step up your game with a modern voice & text chat app. Crystal clear voice, multiple server and channel support, mobile apps, and more. Get your free server now!
and 1 is text?
1 is DM
oh thanks
0 is Guild_Text
Wanna hear something weirder?
The channel ID you use to DM someone is not the same ID they use to DM you
Not the userID
Hm?
to change my bots username would i need to send a patch request?
or does the lib cover it?
djs does that so should eris
I think there's a function for it, but I think the new Discord Dev Portal allows renaming there
since?
you can rename your bot from the dev apps dite
site*
oh
I've tried it but it didn't update it
I couldn't before
Eris, a NodeJS Discord library
That was for the old page
how did i not notice that
The new Dev Portal allows it
Not the actual username
the updated developer portal now has a way to update both application and bot names
Step up your game with a modern voice & text chat app. Crystal clear voice, multiple server and channel support, mobile apps, and more. Get your free server now!
Because it is
hm
:)
It's kinda hard to explain, you need to use both libs to see the dif
just use what fits you the best
I just noticed discord js is more beginner friendly
I converted introduced it to 2 of my friends and they love it
Here's an advantage: DJS doesn't help you get better at JS
Eris does
And this is a thing
mets if i need help again can i ask you?
ok
@deep inlet just because noobs use djs that doesn't mean you shouldn't?
as long as you like it
Did you not read the image I sent?
I personally don't understand how js, or d.js, can be easier than python, maybe i'm just too used to python from the beginning
The Coding Den
well they are very different
A Discord community for (pretty much) all languages
And there's also DAPI (Discord API) for most Discord libs
Node runs server side
Node is great for me because i already knew some stuff about JavaScript
So i avoided learning php for example
It saves me time
And a lot of headache probably
Anybody know a good D.JS NSFW API? I cant seem to look it up on google as my ISP blocks ponrographic content 😂
wat
you mean a image api?
Yes. But NSFW Images
...
idk
¯_(ツ)_/¯
@deep inlet Im getting errors 😦
if i do msg.guild
msg.channel.guild
oh
let me add that
Anyone?
seems to work now
Beefy even if i did
I dont think i can share them here
Why cant you?
umm
"nsfw"
XD
Idk why people even have specifically pornographic bots on Discord
Like, just no
they get quite popular
There ya go
?
you found 1?
What you said lol
no
Do you really need one?
I want one yes
lol
Maybe if you search it on your school computer you'll get better results 
Makes sense
Eris, why?
just wondering
@earnest phoenix djs nsfw api??
lol
Yes
You mean a nsfw rest api
not djs
idk 😂
But I do
google it
sure you do
discord.js doesn't have nsfw apis
Beefy im just wondering but what category of images?
Djs only connects to discord api
k
and if his isp blocks nsfw he has to use a proxy
and i thought my isp was shit, what kind of isp blocks porn
...
All my isp blocks is piratebay and its proxies
Sky Broadband apparently 😂
that's in the usa correct
UK
Who is your ISP, Nao?
@earnest phoenix same timezone lol, but rip eu
mine?
mets i gtg its quite late
NOS, @deep inlet
Never heard of it
Okay, what the hell do I search on Google to get the API thing? I searched up NSFW rest api and idk what it all is 😂
it's the biggest provider here
Verizon ftw baybeeeee
i live in portugal, you know that small ass country that everyone thinks belongs to spain
Lmao
All our isps only block sites like piratebay really
I've never heard of an isp blocking porn sites lol
Sky Shield is the server that protects it
You can always pay for a vpn
I think the best thing to do is go to Google Images and search up porn gifs... I can seem to find the thing im looking for
Rofl
You're trying to make an nsfw command for your bot or something?
Yes
an NSFW Module
Hm
Do you mean a node module
I want something, that is simple, that would post NSFW Images whenever a command is used.
Thats all I want
Do you know how to make http requests
??
there's no nsfw modules for node
Using the request module?
yes
For example
Think ill figure it out
It's easy
I have the yo momma command using a request api thingy
You can try making requests to reddit
bet they have a bunch of nsfw there
hmm
How do NSFW Bot and BoobBot Get theirs then?
Reddit gives you the best of the internet in one place. Get a constantly updating feed of breaking news, fun stories, pics, memes, and videos just for you. Passionate about something niche? Reddit has thousands of vibrant communities with people that share your interests. Alt...
I don't know those bots
But usually the way these commands work is that they make http requests to a website
And return the data, then send it as message
ok
do you have programming experience?
Not a lot but quite a bit
If you don't then this stuff will be confusing
I mean you were asking for nodejs nsfw modules
Lol
lol
I managed to find porn images on tumblr, can I do anything with that?
@earnest phoenix
that's a library for nodejs which allows you to interact with the tumblr api
ok
should be easier than making http requests through Request
As i said if you're new to coding then this'll be confusing
Meh, Ill see if I can grab some gifs images etc off google images and make a huge collection of them 😂
Then post a random one on command
if you have the space and are willing to save that stuff on your drive
then sure
lol
Would it be worth it though?
you said you wanted a nsfw command, that's the easiest way to make one
Okay lol
but you have to save the pics somewhere and have access to them
Ill just put their links in a .json file and name them from 1 to however many I have.
I could also simply steal some from other bots 😂
I'm about to buy a VPS of time4vps but not sure how to set it up because not sure if it comes with windows or linux or somin if u know plwezzz dm me lol
Not sure how to do it lol tho
If you're building a discord bot then it doesn't matter much
Discord.js
Should this work? I saw the 'activity type' thing on a reddit thread.
client.on("typingStart", function(channel, member){
//client.user.setActivity(type === "WATCHING");
client.user.setActivity("you type.");```
Disregard!
client.user.setActivity(`you type`, {type: "WATCHING"})
Yeah I was going to say... lol
Is there a limit for how often, or how many times in x minutes it can change activity?
use client.user.setPresence({ "status": "online", "game": { "name": "whatever" }})
Damn
you request it
get a list of servers and return their names
ok
How can I put the Server-counting on for my bot with Discord Bot Maker?
Do you guys have a suggestion for how to make my discord.js bot appear to be typing?
it should be in docs
Should I define <Connection>.cursor() after a command is used or upon bot start in SQLite3? 
define it once on startup before defining the class
SmaRT PeOPle HerE
also, I noticed in discord.py there is message.mentions representing a list of members that were mentioned in the message
is it a list of unique mentioned members or will members repeat if they were mentioned multiple times in one message?
Seems to be unique
if i either:
- Had my laptop, or
- Had a microphone to use with this desktop computer
i would impart my D.js knowledge on the VC people, but here i am, right?
this reminded me of mee6's voice recording thing feature
cool. i didn't know it had that. i wonder how the developers pulled that off
iirc mee6 is open source 
yay ima go check it out rn
The code is old, afaik
did i mention i built a whole social network in python?
no
feels like I'm building a ladder 
https://puu.sh/B1bzU/c3fa5b0e6a.png
yes
Main reason that im switching my social network to run on ruby
Ruby on rails to be exact
i was running on django, but now i am doing what my username says i am doing, running on rails lol.
how do I console log
________ ___ ___ ___ ___ _______ ________
|\ __ \ |\ \ |\ \ |\ \ / /||\ ___ \ |\ __ \
\ \ \|\ \ \ \ \ \ \ \ \ \ \ / / /\ \ __/| \ \ \|\ \
\ \ \\\ \ \ \ \ \ \ \ \ \ \/ / / \ \ \_|/__ \ \ _ _\
\ \ \\\ \ \ \ \____ \ \ \ \ \ / / \ \ \_|\ \ \ \ \\ \|
\ \_______\ \ \_______\ \ \__\ \ \__/ / \ \_______\ \ \__\\ _\
\|_______| \|_______| \|__| \|__|/ \|_______| \|__|\|__|
(nodejs)
you don't 
:^)
so a question for those who use other libs than discord.js: Do you have to "shard" your bot?
yes
you should create shard.js file
and write in it "PLEASE SHARD MY BOT :^)"
and type node shard.js
I'm not asking how, just asking if other libs have a shard feature
of course...
it's a discord limitation that you have to shard your bot if it gets involved in too many servers
"too many" means a single shard can handle up to 2.5k servers
but of course you can shard earlier than that limit if your bot is losing performance
does anyone know why this is happening
because linters arent very smart
If I want to mention someone to the bot, how can I get the entire mention? right now it comes in as a string with just the '@' and either the username or nickname
@warm prairie in d.js u can send the user obj or
<@userid> works everywhere
@warm prairie
Copy paste that
Will @ u
@warm prairie
thats the thing, its coming to the bot as just "@earnest phoenix"
woops
@someone
oh wait
maybe its because i'm using cleanContent
yeah if you are using user inout and use cleanContent then yeah
yep, thats it. neverminddd 😃
can anyone her help me do the vote to access command?
Hi
I am going to end my Discord Bot project. The bot is in over 1k servers, I want the bot to leave all 1000+ servers. How do I do this?
Delete the bot on the discordapp.com website
Why anyway?
@earnest phoenix will u be able to recover it after?
No
I don't want it to be recoverable
Ok
Ill claim your bot 😂
No
you're getting rid of a bot thats in 1k servers?
why not passing it on or even selling it?
w/ discord.js it seems like some promises are actionable, and some aren't. Has anyone else noticed this?
wdym actionable
for example
// this works
guild.members.get(member).addRole(role).then(() => { /* do something */});
// this doesn't
guild.roles.get(id).delete().then(() => { /* do something */});
i want to see a neural network api for discord
latest
latest stable or latest master?
Lol neural network for discord
^11.3.2
best ideas
Well I have an async message being sent if the promise goes through, on the addRole the message goes to the server, on the delete the message doesn't
yep
Something's not working with this code, and i know im being stupid here. Can i get some advice?
I am catching them too, on the catch on all the promises I only seem to be able to use console.log()
My bot just crashes
No error?
Console.log each line to see where it fails
Wha?
See where it fails
Each line?
Of the selected code that is broken
How?
console.log("part 1 works")
Ah oki
Should help with debugging
Alright and ill just do node not pm2 right?
when-in-doubt console log it out
Ye
pm2 start <path_to_app> --name="name" && pm2 logs name
Uggh i just hate doing that and getting the first 15 lines
it gives you a stream
you don't have to use pm2 for local testing
and the first 15 precedent lines if you don't specify the --lines option
I would only locally use pm2 for things I don't need to constantly watch
Ik i just do everything in a cloud ide sincei have many local computers and i dont always have access to all of them
And that ide is directly hooked up to my vps
thats what github / bitbucket is for
And thats what parents Are for... to tell you to GET OFF RIGHT THIS INSTANT!!!
can't help ya there
in other words, github/bitbucket take too long
Take too long? :0 I have all my bot code hosted on GitHub
oki. i give up. i guess i just have very different preferences than everybody on every discord server i go to.
¯_(ツ)_/¯
some of the images won't load for me on this page https://github.com/DiscordBotList/DBL-Tutorials/blob/tutorials/Tutorials/Java/Getting started with JDA.md
?
im trying to say that some images load and some don't
not for me either
@earnest phoenix What's the issue you're having with the command?
here:
this is what i have:
snekfetch.get(`https://discordbots.org/api/bots?limit=1&search=username:${args.join('+')}`).then(res => {
if (res.count != 1) return msg.channel.send(`Couldn't find a bot that matched the query \`${args.join(' ')}\``)
return msg.channel.send(`https://discordbots.org/api/widget/${res.results[0].id}.svg`)
})
cuz search param can contain many fields
;-;
@cunning orchid
I think that the best way to do it is to just pick one field to search by
have the command always search by username or by description or whathaveyou
you know snekfetch has .query
i did. i picked one field i just limited it to one result
const { body } = await snekfetch.get(`https://discordbots.org/api/bots`).query({ limit: 1, search: `username:${args.join(' ')}` });
do i need to put my bots code on github to become certified?
@peak chasm, no.
lol no
just asked because of
Original code, not a fork of a bot with a new name.
thought u guys would want to check the code
Why does this look really strange on mobile discord
Admin's rgb has been turned on 🎄
It is embbeded as a title and it is blue on mobile and the 🎄 part just comes out as text
@earnest phoenix, not a question for development, but it's because mobile emojis and UI are different.
I think I fixed it
How do i add commands, This is my first time doing this....
I know how to code .-.
lul then knock urself out
Then learn the lib your using properly.
Gg
isn't snekfetch deprecated?
no. D.js even uses it
I use Request for sending http requests
@sick cloud what i do not understand is that bots like saftey jim doesnt have it being blue
They use the author field probably, the title field is always blue on mobile (android at least iirc).
can more than one running program have a separate connection to the same database file? I'm using sqlite3, to be exact
sorry one more question regarding the certification. does the bot have to be part of the list for more than 3 days or me?
is there anyway somebody can fix this so that the images load? https://github.com/DiscordBotList/DBL-Tutorials/blob/tutorials/Tutorials/Java/Getting started with JDA.md
I mean, that's kind of common sense to be here for a little while, but I don't think it's a requirement @peak chasm.
Hello everyone I need some help on dispatcher
data.dispatcher.once('end', function() {
finish(client, ops, this);
when music ends it stops
don't plays next song
I changed finish to end
didn't work too
@pale bison, submit a GitHub issue if you think it's an actual issue.
ok
@sick cloud i dont think it is author as it is the same colour and size as a title which is smaller and not bold
@earnest phoenix, dunno then.
@proper forum do you think you could help?
Hello, help about what?
Sup
Your bot saftey jim doesnt have blue text for the writing on mobile how did you do that?


