#development
1 messages · Page 425 of 1
What does it do?!!
Returns results ordered using the column and in desc or asc
Like for int it goes from highest to lowest for desc and vice versa
For discord.net what would be the name of the permission equivalent to Read Text Channels & See Voice Channels?
https://discordapp.com/developers/tools/permissions-calculator if you need the number, idk the name but you should read the doc
Hey guys anybody know a tutorial/wanna send me text tutorial how to make a website dashboard for bot?
Discord.js btw
quick google search later:
Hey, this video is going to show you how to create a simple web dashboard for a discord bot. The principles are similar to every other kind of dashboard but ...
SimpleBotControlPanel - (WIP) A simple control panel to remote access NodeJS Discord Bots created from Discord Bot Maker (Requires NodeJS) Support me on patreon if you want! https://www.patreon.co...
the last two are not tutorials
what do you call it when you need a webpage to fit the page without leaving white source
i mean like autofit
where
give me a second
at the bottom of a page
sometimes if the page isn't made correctly
it will show your content
do you have a screen or something
having a hard time to understand what you mean
that's not where it is
but you will see what i mean
the white line isn't there
but
you will see at the bottom while switching tabs of category
that the bottom shows more and more
white source?
idk how to explain it ;-;
you mean the empty space?
i fixed the white thing
yeah
idk how to fix that
i can add dividing stuff
but that's a temp fix
Does anyone know how to make a meme command discord.js?
use subreddits
divider is causing the empty space because of the long ass height it has
Hmm
xD
okay looks like i gotta recode
cause i accidentally
copied and pasted an image
into my discord
and saved it
stop using notepad reeeeeee
well dm me when you are done if u still want help t.t
Does anyone know how to make a meme command discord.js?
do you mean to MAKE a meme or just post random memes?
Post random memes
so memes ?
I want to use it just for my own server 🙏 pls help me
i legit
told you ;-;
you needa use subreddits...
its the same with every other random image posting command
@violet wyvern you can get an api (i can allow you to use mine: https://api.ksoft.si) or you can use other apis like reddit api
smh...
@violet wyvern it goes the same, also there is a lot of documentation
Ok
which lang do you use?
discord.js
kk
I still dunno how to use APIs
You know what JSON is?
Yup
what do you use for cat images?
Aws
in the code i mean
K
request
.get('https://api.ksoft.si/meme/random-meme')
.set('Authorization', 'Token insert_your_token_here')
.then(function(res) {
// Do the json parsing and logic here
});
I need to do that in a .json file?
if (command === "cat") {
const { body } = await superagent
.get('aws.random.cat/meow');
const embed = new Discord.RichEmbed()
.setColor(0x954D23)
.setTitle("Meow 🐱")
.setImage(body.file)
message.channel.send({embed})
request
.get('https://api.ksoft.si/meme/random-meme')
.set('Authorization', 'Token insert_your_token_here')
.then(function(res) {
const embed = new Discord.RichEmbed()
.setColor(0x954D23)
.setTitle("Random meme")
.setImage(res.url)
message.channel.send({embed})
});
you need a Authorization header so the api knows who you are
don't put you bot token here
you get your token on the website
never post your bot token anywhere except discord
yes api key you get in https://api.ksoft.si/dashboard
but first you need to add an application
I already did that 😄
sorry i don't see your application
Where?
Ok
<@&304313580025544704> marsyturkiye bot invite plasse
oh good lord
not another one
How do I submit embed this in constants? I have four.
And I want to send it to four
discord.js
Send them individually
{embed} becomes {embed: embed}
{embed2} becomes {embed2: embed2}
for the second one you need to explicitly set the embed key, eg {embed: embed2}
http://prntscr.com/jpplt4 where is the error
where is the error message
Hi, I need help, I need to install superagent on heroku, how do I do it
?
Help pls
yes, a bot can connect to 1 Voicechannel on each guild it is in
did you try google
with talking to discord about your bot shards, is it alright to have the first shard send [0,1] then have the next shard which gets connected correct to [1,3] or would it invalidate the previous shard?
python3
yes
try it
python3 give-it-to-me-daddy.py
did the install fail
you need to install windows build tools
ye
then install 🅱ython

this channel is dead
weird question but on ubuntu how do you cd to a dir with a space
i tried cd music bot but it said no such dir as "music"
it didn't include the second part
You can do cd "name of for"
okay thx
ew dirs with spaces
my hentai command doesn't work either

My hentai command works just fine 😉
my hentai commands work ok
my hentai command doesn't exist you vulgar swines
proper helpful
Is there a way to retrieve invite links of a server your bot is in?
well oof
i'm getting .toLowerCase is not a function when trying to do this on an array. how do i fix this?
@brisk notch .toLowerCase() is a string method, not an array method. So you'd have to either make it to a string or possibly do a for loop or .forEach() to make each index lower case?
@gilded plank bots @hybrid edge
User not found
-bots @hybrid edge
User not found
using luca in #development 😩
#commands or #memes-and-media please 😩
hi who knows if javascript code for a bot I'm looking for a code for my bot that says when he joined support servers
not actually looking for the code in JavaScript so that when the bot joins a server it gives us the invitation of the server that the bot has just joined
🤔
help me please
Your bot would need permissions to create an invite. Not sure of the code.. but im sure its in the d.js docs
I read all the js docs but I could not find anything
you can speak French rather ? @mental solstice
Si
jk, i think there is also a lookup for a server joined date
i dont use JS so im not sure what its called
for javascript
@earnest phoenix read that.. might help
thanks you
@zealous hazel https://discord.js.org/#/docs/main/stable/class/GuildMember
joinedAt
and
joinedTimestamp
hey sup guys
im trying to make a command in my bot to get the methods and shit from the discord.js docs
all i foun is the json files
i dont understand how to use the json files to get the stuff
@fair grail
error: https://hastebin.com/ikenetudag.js
code: https://hastebin.com/wazewajuji.js
help pls
uhhhh, remove token from the code?
is there anyone i can ask unrelated python questions to 🤔
help???
my only assumption of the error is don't use heroku, I don't really do js (or whataver language this is), but ik a lot of errors are unrelated because of heroku
the error is not related to heroku at all
anyway wtf is this
you don't destructure a method
like
what
why
can anyone help me with java in dm?
token again?
@elfin cobalt What library? JDA?
What is your question tho.
String[] arr={getEb().build() + "","2"};
Random r=new Random();
int randomNumber=r.nextInt(arr.length);
event.getTextChannel();
event.getTextChannel().sendMessage(arr [randomNumber]).queue();
}else
event.getTextChannel().sendMessage(" :warning: "+ event.getAuthor().getAsMention() +" this command only works in a NSWF Channel!" + " :warning:").queue();
}```
why he's only giving out net.dv8tion.jda.core.entities.MessageEmbed@2b94e1a1
What is getEb()?
the embed he should post
ok. So is it a own function/class or?
y
so i didnt fail?
You probably did
xD
I personally use something like this:
public static EmbedBuilder getEmbed(User user){
return new EmbedBuilder()
.setFooter("Requested by " + user.getName() + "#" + user.getDiscriminator(), user.getEffectiveAvatarUrl())
.setTimestamp(ZonedDateTime.now());
}
And use it later for embeds.
Makes it a little bit easier for me.
@heady zinc you could tho
const { body } = await superagent.get({ ... });
and what would even be the point of doing that
not having to use res.body
so none 
well, no
discarding everything but the body is not quite nice for error handling 🙃
error handling would be in a .catch clause where you have complete access to the object
Read #rules-and-info. Eh, you got answer in #general.
I?
const { body } = await get()
.catch(res => ({ body: 'fuck' + res.statusCode }));
Yes, you. @earnest phoenix
Thank you
@elfin cobalt that happens because of getEb().build() + ""
the + "" calls the toString() method of the object
which gives that string for embeds
and how i can send random embeds?
MessageChannel#sendMessage(MessageEmbed)
MessageAction#embed(MessageEmbed)
MessageBuilder#setEmbed(MessageEmbed) + MessageChannel#sendMessage(Message)
okay
or instead of building an array you use a switch/if there
would you guys say that a self destruct command that sends “Self Destruction in 3 Seconds” then “Boom” with a nickname change to “Dead” 3 seconds later is classed as api abuse?
(of course then a nickname change back)
if you want to aply this to all members of a 60k members server it's not a good idea. If it's just on a specific user it's fine 
Afaik it's user data @shy verge
they also now require you to get users permission to store their data like ids etc
That's why you put it in a help message
Like a welcome message
If they read it good, if they don't, their loss
how do i even use this?
its a yt vid duration apparently
but i have no idea what type it is
ISO 8601 string
Is it this? https://en.wikipedia.org/wiki/ISO_8601#Durations
ISO 8601 Data elements and interchange formats – Information interchange – Representation of dates and times is an international standard covering the exchange of date- and time-related data. It was issued by the International Organization for Standardization (ISO) and wa...
P - duration
T - time
2M - 2 minutes
27S - 27 seconds
id like a source so i can read more up on this @vestal cradle
return text.replace(/`/g, "`" + String.fromCharCode(8203)).replace(/@/g, "@" + String.fromCharCode(8203));
else
return text;
}```
you see this ppart
you can remove it
well
not modified
but youre changing what you put in
eval will still always support everything
nope
you are simply modifying the user input
i'm not
you are simply restricting input
let me just say
but at the core of it eval still supports math
return text.replace(/`/g, "`" + String.fromCharCode(8203)).replace(/@/g, "@" + String.fromCharCode(8203));
else
return text;
}``` this is the part has been removed by me
not added
i get it, you can do all of that stuff
but its wrong to say eval cant support math or it can be disabled
i didn't said eval cant support
because it will always support it and you cant control it
you cant disable it either tho, eval is unsafe feature and it can do everything, always, so its up to you to restrict the input
when you say disable, you are merely controlling what goes in
not what it can evaluate
lemme just say what am talking
so technically
return text.replace(/`/g, "`" + String.fromCharCode(8203)).replace(/@/g, "@" + String.fromCharCode(8203));
else
return text;
}``` this is the part of a code that coders add in a simple eval , usually to make a math from eval you need to write the whole function like [prefix]eval int a; jada jada jada message.channel.send(this + that ); usually but coders added the above part where i said "math isn't needed for eval to work, quick math is something you can add to your eval
math can be done by scratch code but the code above makes it so you can simply do 1+1 without adding all the code in
i think the fuss here is simply a difference in view on definitions, i understand what youre doing, but to me it sounds like youre trying to say you can change how eval works, when its simply just modifying or restricting input. thats all
let's say this
[prefix]eval x = 2; y = 3; message.channel.send(x + y);
that's the part that gets simplified by js return text.replace(/`/g, "`" + String.fromCharCode(8203)).replace(/@/g, "@" + String.fromCharCode(8203)); else return text; }
so eval can do math but it's not relavent to add the "eval 1+1 " <--- this bit is simplified version of [prefix]eval x = 2; y = 3; message.channel.send(x + y);
how about you add this case to @uncut slate if you're here
what
so @uncut slate
into an "eval code" is math "needed" for eval to work
or is the math part just simpliefied version of [prefix]eval x = 2; y = 3; message.channel.send(x + y);
you can just eval [prefix]eval let thing = 2+3; message.channel.send(thing)
I'm still confused, what are you trying to ask
does eval have to respoond "eval 2+2"
as in eval's firstform
not after adding js return text.replace(/`/g, "`" + String.fromCharCode(8203)).replace(/@/g, "@" + String.fromCharCode(8203)); else return text; }
what are you trying to do 🤔
"eval 2+2" would be interpreted as 2+2, no variables
yes but does eval need to answer that
like if it doesn't have math it won't work
adfljasdjfkasdf
scratch that
does eval work if it doesn't respond to 2+2
there
without restriction
then can i ask
how does my eval work
coz what i understood
people add this peace of code to their eval
eturn text.replace(/`/g, "`" + String.fromCharCode(8203)).replace(/@/g, "@" + String.fromCharCode(8203));
else
return text;
}```
which is not needed
wat
Confused
@native narwhal 2 of my friends says that "eval" SHOULD respond to the simpliefiedversion to "2+2"
which i say thats bs
because eval 2+2 is simpliefied version by js eturn text.replace(/`/g, "`" + String.fromCharCode(8203)).replace(/@/g, "@" + String.fromCharCode(8203)); else return text; }
normally if you want math without adding that code you do
eval x = 2; y = 3; message.channel.send(x + y);
You have posted the same piece of code 7 times now 😂
ys coz that's the peace of code that everyone is concerned should be on eval
it SHOULDN'T but it can be intto eval
Well you can just refer to the already sent piece of code instead of sending it again 😂
ye you can
i was just trying to prove 2 of my friends
that keep bsing about NEEDING to have that
which pretty much turns eval x = 2; y = 3; message.channel.send(x + y); this into this eval 2 + 3
Anyone here uses RethinkDB Dash and has the problem of Can't find any open connections and can't open any after timeout? 4-5 of my shards are able to connect to RethinkDB but after that it just gives that error and fails, if anyone here knows the rethinkdb dash options to prevent such issue, lmk
Hmm, I guess I should increase my timeout even more... Do you think buffer helps with anything in my situation?
is enmap a good database?
no
enmap isn't a db
extension of maps
persistent maps
yes
is this correct?
let voteStatus = await dbl.hasVoted(msg.author.id).catch(error => {
winston.error(`[VOTE ERROR]: Error checking vote for ${msg.author.tag} (${msg.author.id}):\n ${error.stack}`);
});
if (voteStatus) {
msg.author.send(`Thanks for voting for ${this.client.user.username}!`);
}```
What time period should I throttle my points system by?
@earnest phoenix try it and see™
TIAS
So i have cleverbot integration on my discord bot @vernal gull and im wondering should I use a animated emoji or typing because it takes a while to answer
If anyone is wondering i have cleverbot.io
typing
hmm 
i was doing typing but i was thinking about doing animated emoji so i asked here
Shouldn't the line work? http://prntscr.com/jq2lht
are you sure about that?
well I am using an object..
for anyone who cares i just got done making a dbl api binding for dart https://pub.dartlang.org/packages/dbldart
my util is using quick.db so
although i cant think of a single person here who's made a working dart bot yet
my friend @austere coyote is working on a dart lib as we speak i think
i can see it blowing up sometime soon
oh wait oops, yeah it was aemino, not spong
i've already made one, but it's really basic and unmaintaned

the dart shill in DV
ye
was only like a 3-4 hour project
(node:7162) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 11): TypeError: bot.destory is not a function
``` what did i do wrong?
its saying it. bot.destroy is not a function
aka it doesn't need destroy() or something
yes
show code
const Discord = require("discord.js");
module.exports.run = async (bot, message, args) => {
if(!message.author.id == "257521982021566464") return message.reply("No.");
message.channel.send("Restarting... !")
.then(msg => bot.destory())
.then(() => bot.login(process.env.TOKEN));
}
module.exports.help = {
name: "restart"
}
its in a command handler bot is defined in index.js
@floral stone
that's not the problem
use process.exit()
destory
if the bots in pm2 it'll auto restart, otherwise it'll shut it off
how did i not see that
lemme try now
also why not just () instead of msg
also i have an issue myself: how do i change my git thing? in vsc, the source control/git push won't work since its logged into an old account, how do i change it to my new account?
git config --global --unset-all quick google
then add the new one
by the same way you did last time
i can't remember how i did ._.
well remove the current user first by that
ok
git config --global user.name name here
git config --global user.email email here
then them
ty
also if you want to check if that you set, google it
i will
also for a command handler would something like this work for a command file?
module.exports = {
help: = {
name: 'command',
description: 'command desc',
usage: 'xxx'
},
execute: async (msg, args) = {
// code
},
};
trying to make my own
^
okay, so no = for help
and make the = in execute an arrow function
ye
okay
@earnest phoenix btw the git config --global --unset-all code isn't working ;-;
no
it’s like a dummy account which commits to your repo with that set name and email but it isn’t your real account
oh
the error i keep getting is access to imalexok/project bot denied for use <my old account username>
even tho i set the new username and email
refresh console?
this is in vsc
i have NO idea where its still getting the old details from
.>
@earnest phoenix any idea..? ^^
so
anyone can restart my bot
if(!message.author.id == "257521982021566464") return message.reply("No.");
what did i do wrong
if (message.author.id !== "257521982021566464") return message.reply("No.");
wrong way around for the code
np
How would I send a message from one guild to another
lib?
@earnest phoenix
const channel = client.guilds.get('guild id').channels.get('channel id');
channel.send('your content here');
also ty
Np
aowierubvapowiyuvubepwieubvapwiuvbpao9uwbhgr[O9UWRBJGB[p923b7bp-29b73GBP9w8ebuguuipbp97gp9GP-98G4HB93APW[84WBGHA[P98WGB9[P8890hbep[s9eg4
have a password
https://hastebin.com/amebiharuk.js this works ok but at the end of the 2nd song aka the end of the queue the "queue ended i'll leave now etc etc.." msg doesn't send, and it doesn't leave the voice channel. why? 😦
Does anyone know how to get user information in JSON format on steams API?
@west raptor Discord.py right?
"Do not ask to ask. Provide all possible information so people know what's up. Just saying "I get an error" doesn't give us enough information on your problem."
So I made this very advanced problem solving algorithm and whenever I run it I get an error 
async def pat(self, ctx, user : discord.Member):
How do i make it so that user is not a required argument?
If i do *user its not required but then it loses it's object
user: discord.Member = None? 🤷
That seemed to do the trick, Thanks @slender thistle
👌
yo
so I used discord.ext.commands.errors.CommandNotFound
but
its not working
like I did
await bot.process_commands(message)
except discord.ext.commands.errors.CommandNotFound:
await bot.send_message(message.channel, ":exclamation:Command Not Found")
wait
gotta remove those unknown command messages man
Do you use them under async def on_command_error event?
when I told you to try to not send unknown command errors, I didn't mean switching from logging in console to posting in a channel 
how do I mention role? 
yes
how did that not ping anyone
because role is not meant to be pingable?
makes sense
LukiBOT - Today at 2:24 PM
Help needed in MrSheldon's Hub
Invite --> INVITE_LINK_WAS_HERE
ID --> 339085367770611713
@deleted-role
this is the message I get
when I did it without the &
@ruby dust
I have this role and he is pingable
@& is for mentioning a role specifically, and a deleted role most likelly means that the role doesn't exist
the & means role
the role is exists
it happens when a previously mentioned role was deleted
just like how # means a channel
try to post my string in here
with
but like
ok thats weird then
just for the record, it doesn't work without it
if I did it, why am I incorrect?
idk
now what's left is to doubt if your role actually exists or not
or is it pingable
oh wait, how exactly did you get the role's id?
what....?
is that even an id of a role
rightclicking on the mentioned role doesn't work, that way you copy the message's id
best way is to do like me if you have your bot in that server
right click --> copy id @ruby dust
That copies the message ID.
seriously...?
do like I did in the screenshot
javascript please
he tries to copy the role id, I assume
well
not "for some reason"...
doesn't work also with role id
What is the reason
maybe because it's not a role id?
it is
you've been copying the message id all this time
I meant, you can't right click and copy the role id for some reason
It copies the message id instead of the role id
that actually makes sense
Why though
cause you can't click on the role mention just like on user mention?
Well the role mention is just the id underneath so I don't see why wouldn't be able to
because that way you'll be able to click on everyone and here mentions?
which isn't what I'd want to do
I don't see how that has much to do with this
Boi
A role mention is just <@&265125253443878912> parsed in to <@&265125253443878912> on the client so I don't see why you would not be able to right click and copy it
sometimes you'd have to stop and think why some features is best to not be implemented, and I'm sad seing how people can't understand that
Explain how a feature to copy the role id is "best to not be implemented" and don't bring up everyone and here because those two are irrelevant to this
it's not about "how it can be abused" or something, but it's just unnecessary... you expect to be able to do literally anything on discord and that's why it brings you to these questions
Why is unnecessary? It doesn't make any sense. It's as necessary as to have the ability to copy user ids
Well at this point it is an opinion based matter so I am just gonna leave this argument here
What's the problem with this?
Traceback (most recent call last):
File "bot.py", line 18, in <module>
data = json.load(data_file)
File "/usr/local/lib/python3.6/json/__init__.py", line 299, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "/usr/local/lib/python3.6/json/__init__.py", line 354, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.6/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/lib/python3.6/json/decoder.py", line 355, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 6 column 2 (char 136)
root@joshek:~/Arc# ```
The JSON file is
[
{
"Token": "yeet",
"Prefix": "arc!",
"Owner": "372931332239654912",
}
]```
Spacing is correct, just broke in the codeblock.
It's the comma at the end of Owner
Traceback (most recent call last):
File "bot.py", line 18, in <module>
data = json.load(data_file)
File "/usr/local/lib/python3.6/json/__init__.py", line 299, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "/usr/local/lib/python3.6/json/__init__.py", line 354, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.6/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/lib/python3.6/json/decoder.py", line 355, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 6 column 2 (char 136)
root@joshek:~/Arc# ```
?
That's the error now, same thing.
What does the json look like now
[
{
"Token": "no token",
"Prefix": "arc!",
"Owner": "372931332239654912"
}
]```
What if you try to replace the " with '
Same error.
all I found
@bot.event
async def on_command_error(self, message, error):
was this
what do I write for command not found?
await bot.say("An error has occured.")```?
It's supposed to have " but why does it not work 🤔
Unless it's a problem with the code and not the json
This is how I call the token one
bot.run(config["Token"])
hmm
And how is config loaded
I use VS Code.
But do you have it?
Don't have it installed/
UTF-8
The file might be UTF-8 BOM and in that case it would be a hidden character at the beginning of the file
Try to change the format and see if that works
How would I do that?
?
You could probably just make a new file and then copy paste everything in to it
The only thing is that if it was a UTF-8 BOM file the error would have been different 🤔
I'm trying different ways of loading it.
What about the data you're storing, do you have any quotes or anything in it?
Yeah, I posted the JSON before.
Like I mean the actual data (What is inside the quotes), so probably only the token then since everything else is displayed there
Prefix, token and owners ID.
Does the token have any quotes in it?
Nope.
I really don't see a problem with it then
I don't know why it doesn't work
hmmm
why place it in an array?
How else?
{
"Token": "no token",
"Prefix": "arc!",
"Owner": "372931332239654912"
}```
Try json.loads perhaps
Traceback (most recent call last):
File "bot.py", line 18, in <module>
json_data = json.loads(json_file)
File "/usr/local/lib/python3.6/json/__init__.py", line 348, in loads
'not {!r}'.format(s.__class__.__name__))
TypeError: the JSON object must be str, bytes or bytearray, not 'TextIOWrapper'
root@joshek:~/Arc# ```
@hazy marten
@bot.event
async def on_command_error(ctx, error):
if isinstance(error, commands.CommandNotFound):
await bot.say('There is no such command!')
Hope hat helps you.
ok wait
let me try it out
its not saying anything
its not raising an error
but its not saying anything
hmmm
still nothing tho
:/
@slender thistle so I took off the if instance
and I put
yea
I just ook out that line
and I get this
AttributeError: 'CommandNotFound' object has no attribute 'message'
await bot.send_message(ctx.message.channel, 'There is no such command!')
await bot.say('There is no such command!') 
discord.errors.InvalidArgument: Destination must be Channel, PrivateChannel, User, or Object. Received NoneType
xD
@slender thistle
raise InvalidArgument(fmt.format(destination))
discord.errors.InvalidArgument: Destination must be Channel, PrivateChannel, User, or Object. Received CommandNotFound
DOOOOOOD
I GOT IT
I just put a global
in on_message
and did
x = message.channel
and then i just did
await bot.send_message(x , "There is no such command!")
@slender thistle thank you man
or woman
😮

the whole on_message???
global messagechannelmessagechannel = message.channel
global messagechannel
messagechannel = message.channel
my whole on message command is way toooo long
xD
you don't wanna see it
like whats in it
on_command is uh... unrelated to CommandNotFound error. 
I think it goes to it
when there is an error
and then you have to compare the error
so
if isinstance error == commands.CommandNotFound):
await bot.say('There is no such command!')
something like
that
but im unsure
if its like that
but thats like
my logical thoguh?
thought*?
if isinstance(error, commands.CommandNotFound):
await bot.say('There is no such command!')```
exception discord.ext.commands.CommandNotFound(message=None, *args)¶
I am using rewrite and...
elif isinstance(error, commands.CommandNotFound):
if ctx.guild == 264445053596991498:
pass
else:
await ctx.send('This command does not exist.')
``` works.
@bot.event
async def on_command_error(ctx, error):
if isinstance(error, commands.CommandNotFound):
await bot.send_message(messagechannel, ":exclamation: Please Review Your Statement")
ctx.send?
nope
Don't mind me. I am using another version of library.
What
Doing await bot.send_message(ctx, ":exclamation: Please Review Your Statement") doesn't work, does it?
It works like that for me.
await bot.send_message(ctx.message.channel, ":exclamation: Please Review Your Statement")?

one question, why do you want your bot to send command not found error messages? if thinking about user-friendlyness, there is a high chance that a server will be having more than one bot with the same prefix as yours, so you are clearly making a server be spammed with that crap, plus your bot is already muted for responding to bots, and you are just making another reason to keep it muted here 
if at this point you just want to get rid of your console be spammed with command not found errors, swapping this spam to a discord chat is not the best idea
I was told
that it was good
to do so
good practise
wait
lemme find the message
Oh
my god
you said isn't
I'm blind
and it was you
ahahaha
xD
rip
thank youu, cuz I hate error checking
I'll give you a link where best practices are listed
okay
thank you
yo @ruby dust bots like pokecord, have a gift system for people who vote for their bots. How does the bot, recognize how it has voted?
Dbl webhooks
webho- ok nvm
What are the limits for that
60/60 iirc
Should be fine for small bots
Server count
Well the more users you have the more they are going to use the commands (and with servers comes users)
you have to use webhooks if your bot gets to getting over 1000 monthly votes iirc
No, that is only for this
oh ok
What I sent does not have such limitations
btw how much does an average server cost (SQL)
you mean a vps?
Virtual Private Servers?
Well I don't know much about like SQL
I know SQLite3
a bit
of it
so enlighten me
sql is a database, not a server 
because if my bot gets more people, I think I would have to move to like an online server
where it an host the database
it is an*
that doesnt make sense
where it can host the database*
you don't have to be so specific about "hosting databases", it's just a file that contains data
a vps is most likelly what you are asking for
I would recommend skysilk
they are in free beta with 100% discount, and will have a free plan later when beta will be closed
thanks ❤
test
class dbl.Client(bot, token, **kwargs)
bot – An instance of a discord.py Bot or Client object
what does it take
because I get this
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x0000018DD32B3668>
and I'm unsure what's the problem
@ruby dust
is this dbl api?
I don't really use dbl lib, I use aiohttp requests
what does unclosed client session mean
you didn't close the session, I assume
await bot.change_presence(game=discord.Game(name='With Governments'))
token = '#############' # set this to your DBL token
dblpy = dbl.Client(bot, token)
ohhhhhh
ok
how do i dothat
xD
in my case I have session defined as aiohttp.ClientSession(), so it'd be await session.close()
it says
**session (Optional) – The aiohttp session to use for requests to the API.
whats the purpose of aiohttp
it's a python module
yea i know that, but what's its primary function
are you using dbl lib?
honestly, why is the lib even needed? it's like it's so hard to post server count directly to the api
xD
while True:
url = 'https://discordbots.org/api/bots/stats'
headers = {'Authorization': 'CENSORED'}
payload = {'server_count': len(bot.guilds)}
async with aiohttp.ClientSession() as session:
async with session.post(url, data = payload, headers = headers) as r:
if r.status == 200:
await session.close()
await asyncio.sleep(1800)
that's how I have mine
have you checked docs?
huh
i have
198466968725094400
415570038175825930
wait no
how do you get it specifically for your bot?
...
I would like to educate, and enlighten myself through the code provided, after which I would assimilate code to fulfill my requirements
inshort, maybe
I mean it looks simple
take this as an example from #312614469819826177
but it's a bit outdated and it's not really the best idea to update server count on guild join/leave if it's happening a lot
since it will spam dbl's api
instead you should have an own loop with a fixed interval
you want to post server count with a command?
I'm not sure what you want anymore...
const server = servers[message.guild.id];
server.gueue.push(args[1]);
server.dispatcher = connection.playStream(YTDL(server.queue[0], {filter: "audioonly"}));
server.queue.shift();
server.dispatcher.on("end", function() {
if (server.queue[0]) play(connection, message);
else connection.disconnect();
});
}
if (!args[1]) return message.reply("Link please!");
if (!message.member.voiceChannel) return message.reply("You are not in a voice channel!");
if(!servers[message.guild.id]) servers[message.guild.id] = {
gueue: []
};
const server = servers[message.guild.id];
``` not even getting an error
says "Link please!"
even though i did
<prefix>play this is a test message
args[1] would be is
@west raptor
try args[0]
ok
I mean it all depends on how the args are made
arrays start at 0 in js
still says "Link please!"
undefined
console.log args itself
test

