#development
1 messages · Page 370 of 1
@tame rivet should just be discordbots.org/search?q={query}
ohh
everything i try to pass returns an empty array
yeah api/bots?search={query} works but im not sure how you'd add the modifiers
ah okay
danke

how do i make my bot icon animated
(for use on my site not on dbl cause bot page change™)
what do you mean? do you wanna make the icon animated on discord or just on the site?
just on a site
like i think welcomer used to have it
where the icon moved up and down
before bot page change
oh
you can do it with css 3 transitions
.test {
animation: moveupdown 6s linear infinite;
position: absolute;
left: 0;
bottom: 0;
}
@keyframes moveupdown {
0% {
bottom: 0;
}
50% {
bottom: 100px;
}
100% {
bottom: 0;
}
}
thanks
?
even with html <center> it goes to bottom left
maybe try with position: relative;?
now it works, thanks
is there anyway to change how far it moves?
yeah you can adjust the movement in the % amounts
so at 50% you can change bottom to whatever you want
you can also change the time under animation
ok
thanks it looks good now kek

same
also same
@prime geyser u need to remove the line
bot.login(ur token);
and u ask. . . how will my bot login then
change the code to
bot.login(process.env.BOT_TOKEN);
go to Settings you should find it on the top of the website(where u can check logs and stuff)
click it go to where it says Reveal Config Vars
add a var with
Key = BOT_TOKEN
VALUE= ur token without the ""
now ur discord bot token is safe
ok
On ngithub '? @earnest phoenix
heruko
Ok
Yes Ihave found
if u did it properly it should work
u need to change ur github repo a bit
bot.login("fjisdhfiodahfhdsoihfosdihfosdhfaos");
to
bot.login(process.env.BOT_TOKEN);
anyone knows how i can fucking change this http://prntscr.com/icq6mi
recode my whole website?
🤔
just remove does lines of code
the thing is
I use freenom
so :^)
and i code my own
i think u can stil remove it thou
idk
are u using .tk?
yeah you're allowed to remove it
used freenom before
no i don't really need it
In js How to ignore this server on level up message?
K thanks @low rivet
@earnest phoenix make level up messages opt-in (per server)
Then you don't need to ignore any server
K thank you
I need some help. When I try to send info to the site I get this Error: 401 Unauthorized
I'm using node.js and this is the code.
const fetch = require('snekfetch')
fetch.post('https://discordbots.org/api/bots/295310183305969665/stats')
.set('Authorization', 'process.env.BOTLIST_TOKEN')
.send({ "server_count": client.guilds.size })
.then(console.log('loaded and logged'))
you are literally sending the string process.env.BOTLIST_TOKEN
instead of your token
remove quotes around process.env.BOTLIST_TOKEN
whoops
const member = message.mentions.members.first() || message.guild.members.get(args[0]) || message.member;
doesn't work anymore???
Could somebody help me? I have this to download music for my bot js server.dispatcher = connection.play(YTDL(video.url, { filter: "audioonly" })); I needed to update my ytdl becuase it wasn't working and now it's extremely laggy. I used to have js server.dispatcher = connection.playStream(YTDL(video.url, { filter: "audioonly" }));
but that doesn't work anymore
ya same
Do you change ur bot pfp in discord api or do u log in on the bot account?
you need to change your bot accounts profile picture from the bot itself, yes
k
Can anyone help me with discord.js quickly?
!Hosting
How do you get the number of server the bot is installed on with discord.py ? I can't get something working
len(bot.servers) i think
np
Hi
hi
Uhm
Guys how to fix this How to fix this
File "main.py", line 6, in <module> import chalk ModuleNotFoundError: No module named 'chalk' $
I?
pip install pychalk
@pulsar cairn Downloading pychalk-2.0.0.tar.gz Collecting six==1.11.0 (from pychalk) Downloading six-1.11.0-py2.py3-none-any.whl Installing collected packages: six, pychalk Running setup.py install for pychalk ... done Successfully installed pychalk-2.0.0 six-1.11.0 $
that means it worked
Now lemme run again
https://github.com/anthonyalmarza/chalk read for more stuff in here
@pulsar cairn thanks ❤
np
It's working
kk
Anyone help me with some discord.js
How do I set the number of servers my bot is installed on on discordbots.org ?
@old glade #312614469819826177
oh thank you
Anyone help me with discord.js quickly?
?
what be the problemm?
How do i make a custome welcome messgae for when my bot first joins?
@earnest phoenix No need to ask to ask because when you ask to ask you're already asking something 
For custom welcome messages you need a database
first joins what?
a guild
add message to guildcreate event i think
Yeah
ok
and then find the primary channel and send the message in there
@thorny hinge you need to know the channel
^
idk
You have to get a channel object
?
Better learn js then
I am iam
If you dont know what a channel object is, that's a problem
what's the point of javascript arguments[i]
ok
message
Like this? Im porbably wrong
where is channel defined?
how do i define it?

Dude just tell me please
how tf do i do that
I'm not spoonfeeding
which means you need the id
Im fucking confused
a user would have to give yiur a bot an id
Nah
guild has a channels property
Use it
guild.channels is a collection of channels
Maybe get the first
but sometimes its not the first u need
Why cant you just tell me what the code is please
Rule 7b 
and we're not allowed to. We could point you in the right direction but currently I'm not able to grab a link from the docs.
Org


ez don't use djs
Hwo tf am i meant to use discord.js.org if this shit dont tell me anything
I went from GuildCreate From info i dont need
have u learnt javascript?
Im still learning it
learn it first
i dont get why you can just help me with somthing so simple for you guys that i dont understand
I have been it telling me nothing
But it does @earnest phoenix
It provides the guild object
Which has a collection of channels
And you can send a message to one of them
It wont let me tho
im trying all sorts of code but nothing is wroking and apparenlty asking one simple question about code is "Classified" as spoonfeeding
Im trying all sorts of things so it probably looks retarded
that doesn't look like all sorts of things
why message.channel.send
^
there is no message object in that context
omfg
I FUCKING KNOW I HAVE THE GUILD OBJECT
the channels object is a collection
you can do collection.first() for instance
then you have the channel object
where you can call send
now i get this
why did you do .collection
oof
guild.channels.first i think
because the collection object does not contain a send method
^
read this
please
You must get a specific channel from the collection
Also learning all of js's basic concepts before you make a bot helps alot
well
"fully"
you don't need to know everything about the language
but being profficient helps

You need to know all the basic concepts at least
yes
I should reword that
Is this what i need to read
ehm
Finally it worked
👍
Anyone know how to import a json file to a rethinkdb table using rethinkdbdash?
I tried using the native rethinkdb import command but it says I need the python driver 
And Im using nodejs so Im using rethinkdbdash

why does \➡️ \⬅️ return unknown emoji when reacting?
because its a combo emoji
wat
That does not seem to be a discord emote. ➡ ⬅ are discord emotes what you typed is not.
⬅️
Those are discord emotes
You do realize discord stylizes the unicode character
You can escape the regular emotes with \ \⬅️
So I converted all my sqlite tables into json files, here's one of them
{
"userprefixes":
[
{
"userId":"222521619741016064",
"prefix":"👀"
},
{
"userId":"297433416998191127",
"prefix":"..."
},
{
"userId":"392299545821970442",
"prefix":"."
},
{
"userId":"298432861630103552",
"prefix":"Mee6"
},
{
"userId":"402266925670989834",
"prefix":";"
},
{
"userId":"283353337292783616",
"prefix":"."
}
]
}
I'm using rethinkdb now, how can I import the json file into a rethinkdb table? The native rethinkdb import command only works with the python driver ;-;
couldn't find an answer anywhere
(╯°□°)╯︵ ┻━┻
@fervent steeple you tell me how else I'm gonna transfer it then 
manually
manually
:D:D
lmao
I wasnt

I was using sql
But you cant simply transfer sql to rethink in a flash, u gotta convert to json or csv first
@wooden shoal as I said u need the py driver
oh
message.channel.send({embed: { color: 0xFF0069, description: `[Result 1](${links[0]})\n\n[Result 2]\(${links.slice(1, 3).map((l) => `<${l}>`).join('\n')}\)`}});
why dafak
even without the \) or \( it doesn't work
why would it work with \
that's probably what's fucking it up ^
lib?
Pyton
lmao
Can I get some help with websockets? I'm not really sure how you are supposed to log in with them.
also js
Like if I have a website, how would I upload my bot's guild count to it?
oh ok..
inb4 stores bot token clientside
storing bot token on a http web server as the index page
Anyone know a google parameter that forces safe search? This has to be in the search term area and cannot be a url modification.
0xC0000005 is segfault
How to insert a mention of the author of a message in a message? Because I want to polish my kill command by making show a mention of a user instead of a username (I'm using discord.js as the library)
msg.author.toString()
alternatively if you're using string concatenation you can just use msg.author
can someone help me?
i'm making a discordia luvit bot in lua
it says i should check the token but in the code everything is good
local discordia = require('discordia')
local client = discordia.Client()
client:on('ready', function()
print('Logged in as '.. client.user.username)
end)
client:on('messageCreate', function(message)
local cmd, arg = string.match(message.content, '(%S+) (.*)')
cmd = cmd or message.content
if cmd == ",test" then
message.channel:sendMessage("tset,")
end
end)
client:run("it's the token from the discord app website in quotation marks like those >")
discordio?
discordia
^
in the click to reveal
i did
lol
you don’t use client secret
i know
client secret can't help you with bots
but i tried
ask in the discordia server maybe?
they have one?
Try with another application
it’s just discord api server
@weary lily try checking for typos or fuckups in your code
it's not about typos
thats all you can do for now
xd
What about the typos 
did u have a space at the end or beginning?
copy+pasted 
Make sure you are using the actual token
reseting?
i know
Ok
nothing
i even removed pause from the run bat thing
i'm gonna try discordia serve4r
yeah
Artek what client libary are you using?
?
discordia
maybe his discordia is out of date?
yes
i doubt it tho
For discordia, in the login stuff
i did
I think you need to prefix your token witg bot-
oh
So you have bot-MyBotsToken
in the quotation marks?
yes
Yes
try it without
yeah
the same error
Hmmm
try it without questions marks and just put your token there
i did
and it came up with a diff error
maybe it means something?
i'll ss the error
yes
Sorry
yes
oh?
oh don’t -
The bot part being upper case
xD
aaaa
del pic
Anyway
k
xD
yeah
yes
i changed it
Actually
that doesn't look like a real token
@earnest phoenix that's not the actual token
The first part is useless
lol
oh?
the first part is useless, yeah
xD
well i just helped myself by leaking
It's separated with dots
@weary lily it will be the same after changing it, the first part
Anywat
oh
client:run('Bot INSERT_TOKEN_HERE')
Notice the quotes
:l
xD
i'll try
Mind the quotes
Yes
What.
doesn't work
don't Its different them discord.js
remove the first part?
:l
What?
?
idk what to do anymore
I recommened using discord.js xD
Last part of step 4
Hmm 😛
oof
nothing
🤦
Treat the token as a string because it's a string. Its not a variable, its a string. You gotta put quotes around it. You also need to put Bot in the same quotes before the token
Ok
lol
Yay
Good
xD
Hmmm
hmmmm
Rep+ ?
Hmmmm, ok
yeah
I use steam for games not social
reputation
I never trade just sell my shit on marketplace
xD
/shrug
¯_(ツ)_/¯
fail
¯_(ツ)_/¯
\shrug
I'm on mobile
no u don't
No, im on mobile
omg
you just have to be not on mobile
i made a bot about penguins
Anyway, I am going back to shit posting on reddit
it works on mobile for me 
xD
👏 nice
iOS?
yea
I think the iOS app already has that
is this format good for commands? it looks kinda weird.
a way for them to post in a named channel instead of a channel ID? C#
https://hastebin.com/udijafawew.cs
thats how I have them setup now
works fine for me but my bot is a on a few servers and this part dont work for them
@tiny turtle you could prompt people to mention the channel like #general
then get the ID from mentions
even from the other servers, would i have to do this for all the servers the bots added to?
do share links from gists on github automatically give the end recipient editing permissions?
I am trying to get them set up so lets say it searches for a "signup page" and "trials" instead of the channels ID
would be much easier
Is there a limit for updating the presence / game of the bot? I want the bot to switch the game every 10 seconds ...
presence updates are 5/60s last time i checked
but why do you need to switch it every 10 seconds
probably a rotating status:
10 servers -> 123 users -> shard 0 -> !help for help
basically all of my bot's commands @mention the author, is that bad practice?
it's uneccessary
say you toggle feature X, saying "@scenic crest you toggled feature X" is a bit redundant
seeing that they were typing in that channel a split second ago anyway
I personally never use mentions, but imo it'd make sense if there's some sort of delayed task/cooldown
i.e. the bot notifies you when you can do X again
(opt in ofc)
ok this is how its set up, any ideas how to make it point to a channel name not the ID https://hastebin.com/arekeqalat.cs
full script just incase it helps https://hastebin.com/ijomakideg.cs
dun dun dun
okay so
Someone help me please if i add my bot to a new server it crashes because of the guilder memeber add but if i do it to my friends it worked as shown in the top pic
how sure are you that the first channel of an server is always a TextChannel?
you aren't
😉
Can some one help me please
It crashes on my server and my first channel is a text
collections aren't sorted
and everyone can talk in it
they are completly random
so what do it do?
filter the channels collection by channel type
ow would i do that?
use .filter() on guild.channels
and give it a function what tests if channel type equals TextChannel
so guild.channels.filter().send?
give it a function what tests if channel type equals TextChannel
well how do i make the function and dont say use discord.js.org
use discord.js.org
@peak palm stop
if you dont know how to make a function than you should really learn basic js
omg How come you cant help me on one question, ohh wait it's classified as spoonfeeding.
yes
it is
because thats pretty basic and i gave you the answer already
the only thing you need to do is transform it into code and add it in your bot
FUCK YOU

is reacting with an ❌ an acceptable way to acknowledge unknown commands
yes thats completly fine
well
aslong as you dont react to all messages ofc 👀
you should always silently fail unkown commands
its fine if wrong input is provided as example
so if a user sent a message with the prefix but the command was unknown
reacting with an ❌ would be bad
Can someone make an example for me how to get the upvots for a bot in python?
oof
I think you can
for vote in votes
votes being the name of the api endpoint
or if you want to get an individual user's username:
for message.author.name in votes
I think that should work
havent tested it 
im trying to figure out how to make a bot for my sever and im so confus ed
can someone help me lol
@frozen yew you have to code it
if you don't know how to code, just add one of the many bots other people have made to your server
ok
so
^
slightly different being it has a for loopto iterate over the shards, but its still effectively the same snippet
sup
#general if you're just looking to converse @cobalt mountain
hmm
well
i can't think of a problem
it may be a problem with DBL
That's the only thing I can think of but didn't want to start of a sentence with "fix your api" lol
lol
what's the issue?
Tbf its still better than carbons api...they just give you a the parameters and say "use these"
@low rivet Bot statistics aren't submitting to the API
but the page completes successfully (response code 200)
@worthy marten @low rivet
-botinfo @worthy marten
its been approved or compliant or whatever it is
-owners @worthy marten noembed
Sheepy is owned by Jake S.#0001
you aren't the owner 
https://www.discordbots.org/api/bots/329668530926780426/stats
yeah he works on it
That's the URL specifically
@earnest phoenix Add him as an owner in the edit page
will do
@drifting shell did you provide the Authorization header?
https://hastebin.com/eyajeradif.java that's the entire code snippet

yep
added him
w8 lemme check something
Thank you @low rivet
-botinfo @worthy marten
@drifting shell it's supposed to be:
Authorization: TOKEN is that correct?
let me look at your code w8
this is a should be working jda example in java, https://gist.github.com/duncte123/d3ebf090cadddd3d91eff1da112960b4
@earnest phoenix ^
@drifting shell ^

:/...lol
;p
@low rivet {"error":"Forbidden"}
check your api token from the edit bot page again
no extra spaces or anything right?
nope
literally putting in the token as a string now instead of from a file
oh wait shit
Oh yeah my bad
I was putting in the wrong bot id
oops
Because I didn't remove the getSelf().getId() lol


private static final String URL = "https://www.discordbots.org/api/bots/329668530926780426/stats";
private static final MediaType JSON = MediaType.parse("application/json");
``` I found the cause @low rivet Can you see anything wrong with these?
i don't know java but I don't see anything wrong in that snippet
did u include the auth header though?
These 2 were the cause of it
and yeah I did, the problem is solved, just don't know why this would cause it
Something I've learnt about the responses with teh api, is that if its {} then it worked, if not its failed @low rivet
by that I mean the response body
@low rivet Do you have any control over the documentation or are you just another developer?
I'm a developer 
Who do I ask for a change to the documentation @low rivet ?
they are in the midst of revamping it, and #267327844357636097
-botinfo @polar mist
Sorry to keep @ing you @low rivet but...thanks again ❤

-botinfo @devout ferry
hi
@digital coral what lib do you use?
discord.js
in js you do setGame('fuck doodle shit') and it'll say fuck doodle shit as the bots rp
what
rp = rich presence
but how do i change it to watching
yeah but he wants WATCHING as the presence
then do setGame('WATCHING') instead
no
hang on
presence.activity = {};
presence.activity.type = "WATCHING";
presence.activity.name = "test";
client.user.setPresence(presence);
i would recommend doing it like this
ahh thx
wait what version do you use @digital coral ?
its setActivity for discord.js
uhh i havent checked but i can upgrade or downgrade if needed
you can use a number or "WATCHING" in d.js
oh kk thx my pc is downstairs so yh
you don't need to upgrade or anything its just that im not sure if setPresence is in v11
ahh kk
its bot.user.setActivity I think for v11
or client.user.setActivity, whatever you use
kk thx for the help
yw

eval this: while (true) {}
it crashed my bot
im adding that as a command to admins
!crashthisshittyafbot
hmm an eval
why dont i allow eval for everyone for 5 minutes
soo much fun people downloading rats to my pc
yay
wait bad ide
A
(just going to say I think having an open eval command is VERY dangerous and it should probably be restricted to you only but thats your choice)
ik i restricted it to my id but it looks like fun just setup a vm incase someone downloads a file to my pc xD
and people wo;; steel my token
even for 5 minutes, thats just..eh
@earnest phoenix got php syntax wrong
he wrote echo test
instaid of echo "test";
his 12 tbh
lol
and I don't suggest letting people know of your eval command's existence either, if somebody besides you tries to execute an eval command, just go out silently with a return
but again, your choice
¯_(ツ)_/¯
it returns true if it has my id else it says invalid perms or something, i will remove that
When you have eval enabled for everyone on your selfbot
Me:
!eval
message.reply(client.token)
ctrl + shift + i > Application Lcal Storage > Replace > Post Im gay
How can I get the votes of my bot from the dbl api? How do I authorize my self with the dbl_token?
you need to make a get request to the votes endpoint with your bots token as an Authorization header
o
headers = {'Authorization': dbl_token}
api_url = 'https://discordbots.org/api/bots/' + str(bot.user.id) + '/votes'
async with aiohttp.ClientSession() as session:
await session.get(api_url, headers=headers)``` Like this?
@austere meadow
yeah i dont really use python but that should work
Hmm ok. I think its working, but I dont know how to save the requested upvotes in a variable
do you know how to get the response from the get request in py?
just save the response
No I dont ... 😦 😄
well thats unfortunate because i dont either
maybe try looking up on google how to get the response from aiohttp get request?
<& + role id + >
thanks
async def get_upvotes(bot):
headers = {'Authorization': dbl_token}
api_url = 'https://discordbots.org/api/bots/' + str(bot.user.id) + '/votes'
async with aiohttp.ClientSession() as session:
async with session.get(api_url, headers=headers) as response:
return await response.text()``` Im now getting the response from it, but its Unauthorized again ...
😕
Or is there a differents between 'Only for Bot Owner' and 'Requires Bot token'?
@worn ridge they both need your bot token
^
But why do I still get {"error":"Unauthorized"}
becuase your token is invalid
I have the token from here: https://discordbots.org/api/docs
no extra spaces?
No
call .delete(10000) on the resolved msg object from the send Promise
What is the method for resetting a user's nickname using discord.js?
GuildMember.setNickname(GuildMember.user.username)
how to make your bot work
how to make your bot online
@earnest phoenix oof
????
I cannot seem to understand that sentence
🤦
sorry
do u know any coding language?
jacksonDTM - Today at 8:56 PM
code```
ur in the wrong place
i am mind blown @drowsy falcon
same
true
can someone help me think of a nerdy type command like binary, weather and stuff
no xd
😦
oh yes
i made a binary command on meh bot
doing my homework rn
k
playback .xm modules in voice channels
-turtle
guys
gives u a random turtle info out of 100 diffenrt types of turtles
ok i find code
what do you use for hosting?
a VPS
kk
a VPS is dank
im using Glitch
it brought my ADSL to crawl
beacuse im a n00b
and made the pi overheat
rip
having 10/0.5 ADSL is no fun
ok
translate?
http://mathjs.org/
math.eval(expression)
ik
how can i make my bot copy random image from a subreddit (r/dankmemes) and send it when the command is sent?
is there awaitMessages for eris? can’t remember
@restive silo whatay you look at me for
mom
@earnest phoenix how to add bot on sword
@earnest phoenix not by default, I made a helper that lets you await one
jacksonDTM, "Do not @mention people randomly."
you did ?
yeah
this is what it says in description of this channel
it only lets you await a single message though
it's all I need myself, you might need more functionality
no dats for #memes-and-media
whatever, just stop talking in #development
if (message.content.startsWith(prefix + 'poll')) {
let args = message.content.split(" ").slice(1).join(" ");
let pollsend = await message.channel.send(args)
if(!args) return message.channel.send("** ❌ | Merci de donner la question**");
message.react(✅)
message.react(❌)
}
pollsend```
ok
what is the problem?
I dont send
go testing-1 like that I could use Translate Bot because I speak English wrong
@wooden shoal <3
the error is the message.react(✅). it needs to be a string. message.react('✅')
"" is important
@neat falcon do you want to check the name of the variable?
ie, var test = "hello" would not check "hello" but rather test?
i would like to check if activeWin() contains = Google Chrome 





?