#development
1 messages ยท Page 429 of 1
you don't need to pay extra for mysql in any vps
And you can just install mysql yourself anyway
^
all of them allow you to install mysql yourself
If they allow you to pay it's not for the software but them handling the install and everything
aka starting a docker container
okay I checked DigitalOcean, but I can't find the API for python tho
api? @buoyant oak
damn this server stuff is so confusing
you use packages to install stuff like mysql and python
droplets?
it gets easier
a droplet is their word for vps
ahh
No problem!
I wrote a command for my bot that uses the Steam API
Apparently the issue with it was actually a steam api issue
contacted them and they pretty much told me : not our problem
lol
Ima be timing the 10 hours extra waiting time, gonna need to figure out a wait to make it so I don't need to Task.Delay for 10 hours
It's more like 1 hour but I can't see myself Task.Delay that long, the bot is gonna die if everyone uses my confirmation system
anything that makes the bot wait for 1 hour sounds like a pain
Gonna need to modify the full command
and work around the database
Not to sound in a rush, but how long does approval usually take? (Mine was in since Thursday)
from 1h to 1 week
It all depends on how many bots are in the queue
and how many web mods are currently on it
Yeah, it just depends on when your bot was submitted, its position in the queue and how busy the moderators are ๐
hello all.. do you know const map = new Map();
"new Map();" mean? whats npm model?
it's a map
Like key value pair
example: mapThing.set("thing", value)
so that the "Map" can work, do I have to input in package.json?
or new js?
ohhhh okkk, thankyou so much (:
np
but, Activity Log say "Map" is not defined.. :/

@earnest phoenix if you are storing data and/or editing key/values then you should use Enmap.
@earnest phoenix show your code where you're using Maps 
use codeblocks u.u
yes
if (!serverQueue) return message.channel.send('There is nothing playing.');
return message.channel.send(`
__**Song queue:**__
${serverQueue.songs.map(song => `**-** ${song.title}`).join('\n')}
**Now playing:** ${serverQueue.songs[0].title}
`);```
const queue = new Map();
when i skip some song, after that not playing any music again
Activity Log said "undefined"
yeah that's because the queue probably ended
Is there a way to check how many servers your in through a bot or an external API?
there isn't anything specifically crafted for that purpose, but the Discord OAuth2 screen (when an application is asking for access to see what guilds you are in) will show you all the guilds you're in
other than that not really
Are there any good guides on adding grids to your website? I'm using totally custom css, and unlike a framework it doesn't have a grid, so I'm a little stuck since I need grids ._.
Like a datagrid.. or like a 4x4 square to put text in
like a layout thing, on the left side a login form, on the right side a register form ยฏ_(ใ)_/ยฏ
50/50
3 divs.. 1 outer width 100%.. display inline.. 2 inner with width 50%.. display inline-block
Been a while since i mess with css.. but something like that
Oo okay, thanks
Maybe float the first inner div left, and the second right (if necessary)
I'll have a mess around with it, thanks though 
๐ google is your friend too, probably not as thorough as my answer.. but it will do ๐
Anyone here know how to use weebly api so my bot will update a command if the website updated. I use discord bot maker. Also how to make it show 3 latest
@earnest phoenix try not to post offtopic comments in channels if they aren't related to the topic or an active question ๐
dbm is mostly just javascript
so you could make a webhook thing compatible with weebly and a seperate api for your bot's command (that the bot command itself requests from)
i'm making it sound easy, but hey this is probably what you have to do
message.client.user.hasPermission("ADMINISTRATOR")
Anyone able to tell me how I can refence the bot instead of member
message.member.hasPermission("ADMINISTRATOR")
d.js? @stray wasp
Do you want to see if the bot has the admin perm?
sorry yes.
Yes it's d.js
discord.js
For d.js yes
I didn't know about that
neither haha
Always good to refer to the docs
thank you willi.
Np :D
discord.py also has a Guild.me
Anyone know why Intellisense isn't working really, I'm not getting all the possible things to be able to do with a variable like client.
I don't know if this is a stupid question but can I buy my bot Nitro? I would love him to have an animated profile picture
nope.
Ah dangit
yeah
@stray wasp because you are in new files and pass arguments but since you only use JS and not Typescript intellisense doesn't know what types are all of these variables
dbl.postStats(client.guilds.size, 0, 0) gives errors
const DBL = require("dblapi.js");
const dbl = new DBL(mytoken)
everything is defined
@restive silo sorry I don't understand.
okay so you are not in your main file anymore where your variables are defined
intellisense doesn't know what are the types of these varaibles
since you use plain Javascript
and not a transpiler like Typescript what includes typings
what can I do to fix this?
use Typescript is the only real "Fix"
darn't js is broken damn
no its not broken
alrighty well thank you.
but it has no type definition in it
are wbehooks working again?
Should be.
im using glitch so how can i use the wbehooks
i am running the ping code on the 3000 port
and glitch only allows 1 port
anyone help me
with..?
Would be helpful (if not required) if you specified what you need help with in the message you express you need help in
how to create a webhook and if people mention me, bot it immediately tell
We won't give you code (In case that is what you wanted) besides you have not specified the language nor what you have already tried or anything else regarding the issue
apparently the webhooks arent working
ok
Are they not?
is not working dude
cant say for the vote button, but the test vote button is working for me
๐ค
I'd rather you not ping me, thanks
Did you just expose your token? Or what's that long-text thing? 
its webhook @slender thistle
It's the Discord webhook link thingy
Whoops, my bad. Sorry.
thats still a token, you should maybe reset it
even if a webhook has no real permissions
yup
Was just about to say
ok thanks
ye
Hmmm
that happened once in a server, person abused webhook to at everyone in a server lol
Oh wow
app.get("/weebhuk", (req, res) => {
console.log(req.body)
if (req.body == undefined) { res.send(400, 'Not Recieved') } else {
res.send(200, 'Webhook successfully received');
}
})
using express
and when i put my url in the dbl webhook section it doesnt send a request
i tested it a couple of times
try this
i didnt see any difference
app.get("/weebhuk", (req, res) => {
console.log(req.body)
if (req.body == "undefined") { res.send(400, 'Not Recieved') } else {
res.send(200, 'Webhook successfully received');
}
})
there try this one


I need some help with Discord.JS
TypeError: message.channel.permissionsFor is not a function
message.channel.send(guilds)
.then(condition => {
client.guilds.forEach(guild => {
client.users.get(guild.ownerID).send(nt.arguments.slice(0).join(' '))
guilds = guild.name + '\n'
})
guilds = guilds + '\nSent notification to ' + client.guilds.size + ' guilds.'
condition.edit(guilds)
})
Why that error is appearing?
It can be a Discord.js problem
your issue isnt in that code?
Probs not
That code makes error output
permissionsFor.. where are u calling that
I didn't called that anywhere
I cannot find it
Um
I found but ppl didn't talk me this is prob
if (message.channel.permissionsFor(message.author).has('MANAGE_GUILD')) { permissions = 2 } else { permissions = 0 }
well its telling u that, that function doesnt exist
yeah
Is there other way to get perssions of author?
.has isn't a method on the permissionsFor thing, unless that's vanilla JS
maybe that?
Deprecated
not the one above
might need message.member
Wait a sec
I am gonna test
TypeError: Cannot read property 'hasPermission' of null
Oofs
๐ค
did u use author or member
member
if (message.member.hasPermission('MANAGE_GUILD')) { permissions = 2 } else { permissions = 0 }
Author is not working
and its definitely message.. not msg? or something else
is message.member.permissions.has('MANAGE_GUILD') a thing?
I tried
But it returns err
TypeError: Cannot read property 'permissions' of null
wait a sec
I'll check the output of permissions
It returns bit
debug and see if u can find it in the collection
I read the docs and found 'has' will search bitfield has permission
But I cannot solve yet
is it a role?
just reading.. that hasPermission is a role function.. not GuildMember
I found
message.member.permissions.has('MANAGE_GUILD')
This returns me boolean
in discord.js I get any error saying permissions are to low while the Bot has administrator
Dream, check your hierarcy
@mental solstice Thank you
if your bot role is below the role of whoever u may be trying to change.. you will get an error
np #$%##
lel
:p
property of null.. so its saying the member is null?
I think it is creating a report about ALL objects
I'll try blobking bots first
if (message.member.permissions.has('MANAGE_GUILD')) { permissions = 2 } else { permissions = 0 }
if (message.author.id === '324541397988409355') permissions = 4
const prompt = prompts[message.content.split(' ')[0].slice(endpoints.prefix.length).toLowerCase()]
const notAllowed =
(message.author.bot)
|| (message.channel.type === 'dm')
|| (!message.content.startsWith(endpoints.prefix))
|| (!prompt)
|| (permissions < prompt.worker.permissions)
if (notAllowed) { return }
const nt = {
arguments: message.content.split(' ').slice(1),
i: _application.translations(prompt.language)
}
prompt.worker.execute(client, message, nt)
Oh
@mental solstice Why error is appearing was I didn't blobk bot first
But I got new problem if I add more if conditions
*optimization
(node:3337) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): DiscordAPIError: Privilege is too low...
i still get this
ive tried everything
Are you changing guild owner?
Your bot has to have a role that is higher than the others role and it has admin/managenicknames
Who are you trying to nick?
are u running !afk
yes
are u the server owner
yea
yes
@gleaming summit what new error?
@mental solstice Completly solved
I didn't think that I didn't removed bot things
You were right
now if only i could get my wife to say that ๐ค ahah jk.. glad youre situated
๐
using VSCode is nice, because u can run debugger which allows u to watch variables, and step through code at breakpoints
im wondering how you can determine if content is nsfw or not, since i want to add a feature to my bot that could request data that is nsfw if the user decides to request that
check if the channel is nsfw
i mean the content. since the feature can request both non-nsfw and nsfw content
add a nsfw argument
i don't understand
what language
discord.js
isn't there something like channel.nsfw?
I think he's asking about user content, not a channel
^
short answer, no theres no way to tell
Keywords is about the only way
unless you use image recognition and language filters
ok
how do i add commands to my bot?
depends on your library/framework
are you using async or rewrite
rewrite
ok I'd suggest using the commands framework thing that comes with discord.py
aka using cogs
how do i get discord.py tho
kek
what?
you can do either python -m pip install -U discord.py[voice] for voice support or just python -m pip install -U discord.py for no voice support in a command prompt/terminal
no but where do i download or find discord.py
that is downloading it ๐คฆ
can u not give me the html
wdym
how do i download it
I just told you, that is downloading it 
how do you not get that 
because i dont python -m pip install -U discord.py[voice]

python -m pip install -U discord.py[voice]
python -m pip install -U discord.py[voice]
?
no why are you saying that in discord
I am confused
you run the command in a cmd prompt
In a command prompt
I said that before 
'python' is not recognized as an internal or external command,
operable program or batch file.
you dont
now you just open up a python file and do import discord or from discord.ext import commands if you're using the commands extension for cogs
ok thank you for your time and help
actually both
personally I only did one 
k
i made my command on visual code but my bot is still offline
did you run the code
how do i do that......
google it
depends on your library
they're using discord.py

python <mainfile>.py
the command to run the bot
Tgm.. use terminal in VSCode
I have never used vscode for python
I never use python on windows
and never use vscode on linux

Tasks are only available on a workspace folder.
Might be something in there to set up a workspace
not sure that you would host your bot through visual studio code
but hey, whatever you want
It has a built in terminal
Oh.. not sure that you would* nevermind :)
But its easier to test from the ide
so
How much ram does Glitch give you?
ill check
Because your guild cache is most certainly in RAM
what's the ram usage of your bot currently?
uhh i dont know how to get that
run an htop
?
htop command
lists processes
Would it work if you took your bot offline and hosted it locally
I can't find anything on Glitch's ram
But I can't think it's 30GB/container
i have my commands but my bot is still offline and dosnt work
Do you have python installed?
I'm trying to run it on my pc @quasi marsh
Open terminal.. navigate to project directory and use the python command to run it.. idk what the commands are.. never used python
I guess
ah also what's the current node version
10?
i'm on 6.11.4
does node have 64bit ints yet
64 bit != bigint
Neither does python it just converts to long implicitly
then what is a bigint
well i have prepared : String(guild.id)

arbitrary precision numbers behave fairly differently from 64bit
uhh ok
eg a large enough computation will freeze everything
while for 64bit it'd at most overflow
try 99999999999 pow 9999999999 with bigint
nah im good
im just installing node v8
from v6
bcz i used to use an online host
now testing on pc
I'd suggest v10 but that's your choice 
i rarely use node on my pc

Oof node requesting access through shitty windows defender
uhh i just downloaded my bot file in min
Also, well @earnest phoenix sharding is pretty much for receiving events
@trim plinth oof well the latest version I have access to is v8
Sending a message is done with the HTTP api and doesn't require sharding
oof
@trim plinth apt-get isn't always 100% up to date
The last time I used apt-get it gave me node v4 
the rest api isn't even aware of what a shard is
I wouldn't know what the problem is, but it's not sharding related I can tell you that
oof
They are up to v8, but the node command doesn't like to do anything with apt-get
So I had to manually install node
What library are you using?
lul
And sometimes jda
also on glitch @quasi marsh , while sharding: ```js
(node:5758) UnhandledPromiseRejectionWarning: Error [SHARDING_READY_TIMEOUT]: Shard 0's Client took too long to become ready.
i install directly from repo
Wait
for node
You are sharding?
Don't shard
Yeah as I said, Glitch isn't meant for things like this
yeah
I use pm2's clustering
oh well
n-no
I know, it just splits the load onto my cores
It helps with performance
For me at least
Guru don't shard one server
I would but take my advice with a grain of salt cuz Idk what the difference is between clustering and sharding
clustering is eg splitting work into multiple worker processes
sharding is a discord thing
I'm not 100, but I'm pretty sure using pm2 clustering won't actually cluster the way you want
Hmmmm
are you running a bot that is clustered like that right now?
Yes
use htop to check the cores
Mkay
Ssh to the rescue
They are all about level at 8%
@waxen spoke yeah, they are all pretty much level
Because you're not running it?
Have you checked that the run button actually starts the script?
don't
stop
do that
please
discord.py/visual code
what terminile??
Should be a button in the view tab
integrated terminal?
Yes
k
Hey, not sure if i should as this here but...
Anybody wanna collab on a bot? Ive been wanting to do it but cant find anybody :p i dont care how experinced you are
I use visual studio and programm with python
discord.js he said in shitpost ๐
bot.guilds.size
thanks
Well what language
What's the limit for adding reactiions>?
discord allows 4 per second.. i know c# lib throttles it to 1 per second
yeah, the response headers take 1 second? something like that, and d.net enforces that.. "preemptive rate limit"
response headers are in seconds
I think you're talking about D#+
That lib hardcodes their ratelimit
D.Net caches requests and dynamically throttles them
afaik
Nope, ive went rounds with these guys been in the discord api d.net for a long time..
hmmm
My bot was adding 3 reactions to a message and it always triggered the preemptive
They have made a push request for opting out of the premptive ratelimit
Anywho @floral stone if you use the discord endpoint for adding reactions, you can send 4 per second
hello.. anyone know string code for deny everyone connect voice?
example : deny:0x400 is can't view channel
@mental solstice not me, the bot
yes.. the bot too
When I get an error.. this doesn't react with the error symbol? http://prntscr.com/jtfdvf
it just errors in console
I don't think you need the if or return, but thats weird anyways ๐
I decided to do it because I thought it was like .catch() and I thought thats why It wasn't triggering
but
ยฏ_(ใ)_/ยฏ
But still that doesn't make much difference.. it still doesnt work..
in discord.py, how do I check if a user has a specific role in a different server?
First off, you would get that guild
Does your bot have permission to react LoseJoe
here idk discord.py im pretty sure its like d.js so
ye it does
it just gives me the purpose error i put into my command
to test it
in logs
discord.utils.get() iirc
wot @patent reef
Um, any reason why this is erroring on run?
let startTime = new Date().getTime()
const canvas = Canvas.createCanvas(700, 300);
const ctx = canvas.getContext('2d');
const bg = await Canvas.loadImage('./background.jpg');
ctx.drawImage(bg, 0, 0, canvas.width, canvas.height);
const attachment = new Discord.Attachment(canvas.toBuffer(), 'image.png');
msg.channel.send(`Generated image in \`${~~(startTime - msg.createdTimestamp)}ms\`!`, attachment);
@sick cloud maybe you have to recheck inputs
recheck what inputs?
yeah
huh ok it worked this time, might just be a one time issue?
๐
that will be better if you use test bot
Why does my lavalink just randomly stop playing or won't play anything until restart
So i program in python client.event
I've been trying to figure out how to program the command where you do ?info @someuser
and then it says:
status
id
highestroll
joined discord at
joined guild at
Can anybody help me with this program?
uhh
data.shift().splice(-1,1)``` doesnt work?
(trying to remove an element from the front And back of the array
it does, it removes the first element but it returns it
you could do data = data.slice(1, -1)
so
data.slice(1, -1).splice(-1, 1)```?
whats the difference between slice and splice wth
no literally what I sent you
data = data.slice(1, -1)
.splice modifies the original array, .slice returns a modified version, and the args are different
npm i canvas@next, but depending on the platform you'll need to install the correct requirements found at https://github.com/Automattic/node-canvas#compiling @tulip snow
Tony, What if its hosted and you don't know the platform?

why would you not know what platform your host is on
besides if you're using a free host like glitch or heroku
(glitch uses ubuntu afaik)
I figured out a way to make graphic in python using html/css
@earnest phoenix well it says all requirements for all platforms on the link q.q
I guess nvm... my question just keeps being pushed away
@covert roost Isn't there a discord.py Discord server or something? You could ask there.
Hmm. Dm me mea link please
couldn't you also ask in the discord.py channel in dapi
@sick cloud How did u fix the error while reading from input stream thing?
How to remove my bot token from github and re-apply
@tulip snow I ended up fixing the file path. it was .jpg not .png
@upper zodiac Uh.. edit whatever file the token is in on GitHub, then resubmit your bot.
My bot token at github cause there's something wrong when i hosting it but now it's okay but forgot to delete the bot token from github
Well thats easy to fix, as I just said. 
What host are you using?
@sick cloud urm at the application page?
@upper zodiac? Go to GitHub, remove the token (from whichever file your token is in), then go back to discordbots.org/newbot and resubmit your bot.
๐
How to delete all these ^
Ouh okay thanks
๐
@sick cloud
Ouh luckily i can copy paste from my web
can you give me youe Canvas code
@hot sleet No.. learn yourself .-.
PLEAAAAAAAASE
#rules-and-info, we don't spoonfeed. ๐
Because its better for you to learn. Google node-canvas tutorials or something.
No problem ๐
Is it okay for just deleting it but not resetting the token bcs my pc not with me, i can't edit the token in bot app
No one take my token โ
As long as your token isn't public anymore it'll be fine.
.gitignore
Once public always public, you can't trust that no one has the token after it being public ๐
Apparently they can't reset it or something ๐
Nope, i have no github visit.
I know how to use awaitMessages, but is there a way to do it multiple times? I'd like to collect multiple arguments, aka a setup wizard:
me: !setup
bot: hi! enter a prefix:
me: !
bot (edits original message): awesome, what do you want me to call you?
me: steve
bot (again, edit): okay steve, thats all!
Something like that at least, I'd be awaiting messages 4 or 5 times, and putting awaitMessages inside awaitMessages inside.. la la la, its pretty spaghetti codeish ๐
Is there a cleaner way to do it (using discord.js)?
use a collector and respond to each
Await is just for a single while collectors are ready to mingle
in discord.py, what is a way to check to who the bot application belongs to?
I'm pretty sure it's possible, at least by bot's token
cause I know rhyno's music bot has that
I'm trying to avoid asking there, thanks
rewrite
Make your bot through a programming language. Which one to choose is up to you.
this is gonna be complicated but
does anyone know how to turn an array of objects into a single object that has keys that are indexed in ascending order, where the value is the original object in the array?
so say i have
[
{ yes: true, no: false },
{ yes: false, no: true, blue: "who" }
]
and i want that to be converted to
{
1: {
yes: true,
no: false
},
2: {
yes: false,
no: true,
blue: "who"
}
}
๐คฆ
yeah
You want the array to become a map essentially?
Heyo. Can someone explain to me what is sharding and how it works ?
let arr = [] //add your array
let obj = {};
arr.forEach(o => {
obj[arr.indexOf(o)] = o;
});
Not too optimised but should work @austere meadow
Instead of using arr.indexOf(o) just declare an index value outside of the array and increment that
thats fine, ill give it a go, cheers for the help 
and yeah ill do that
Aight
Way way way way way better than using indexOf
forEach has an index counter anyways so its good
Yeah
let arr = [] //add your array
let obj = {};
for (let i=1; i<=arr.length; i++) {
obj[i] = arr[i-1];
}
Not too sure if this works
@native narwhal @austere meadow
thank you so much! just one thing, i wanted the index to be a number, not a string, would i just use Number(i)? https://please.zbot.me/KP6B8MbX.png
It would need to start at 0 otherwise it would skip the last index
I mean it should be a number
it should be
Maybe keys can't be numbers?
hmm
Why do you need it to be a number?
oh you're right i think
theres definitely a better way to do this (and im looking for one tbh) but the way i am doing my items system right now is like this https://please.zbot.me/9GugSUYH.png
i have one for badge and weapon, as well as background
thats why i need a separate object for them
however i could probably split them up like exports.Backgrounds = { 
wait
im really confused
if keys can't have numbers why can i assign a number to a key here
and it's still working
use for of and not for each or yukine will be angery
why do you need to convert it anyway?
The only question I have is why if you are just going to use numbers as the keys do you use a map/object containing all of them when you can just use an array?
you make a valid point
@spring ember because i want an easy and dynamic way to convert my badges (which are stored in an array) to this format
i think i was just having an object overload on the day i made this
But in this case it doesn't seem to be
well ok long story short i was really tired and i wanted to get it over and done with
ideally the numbers should be the id of the item, but they aren't
and it doesn't really matter too much
also number is a bad idea
Hmmm
so i'll either convert it to an array or an object with the right key
I remember putting my id as a number then printing it and it came out differently
i dont know which would be better but im leaning towards objects
umm depends what do u need to do
objects would make it easier for me to access in the long run
so i don't need to iterate over the entire array to find an item
because the idea behind it is that all items in my bot are stored here, and if i wanted to easily look up an item for some reason, i can do it here
If you are going to get the items by their id often than go with a map/object
A map and an object works the same way in JavaScript but I have no idea how they differ internally
alright then
I think they work the same way at least
yeah i dont think it'd make a huge difference anyways
Yes keys must be strings
object is a map
An object is a dictionary not map :P
Anyone who have some 15mins and who can create a bot for me with just 1 feature auto responder?
not development related
๐
there are many bots with autoresponder
it's not a beginner
it's someone asking for someone to make a bot for but I edited it anyway
I don't know a single coding
๐ yea I know but they have other features too and i want just 1 feature any way I read somewhere that they( this server) creates , makes , develops bots but came to know that u only make bots for something u can get means u need something to make a free bot.
oof
this server is a place devolopers can add their bots..
kinda like advertising their bots but ye
Primezord, try looking up a video or somthing i watched videos to help create my bot..
The programming is pretty simple if you understand how to code
One thing my friend told me was "codeing is not about memorizing its about understanding and not to just dive into bot proggamming but to understand how to use that language of code first"
Which were a problem for me...
I code with python in visual studios
And i kinda memorizad how to put in text to randomize and normal text
My commands are more if this then that :
elif
await
Its kinda simple but i dont know abkut autorelsponse bots... but i think you should try it yourself!
var mystring2 = "JavaScript discord ppl.";
document.write(mystring1 + mystring2);```

Damm got confused I should have gone to HTML first
Instead of Js
you should use let and const instead of var
@austere meadow How long does it take get my bot certified? I've been waiting for 2/3 weeks now ๐ฐ
read #announcements, Oliy will continue certification apps on the 22nd of june
Blake?
๐
Do u know whats the beat way to get an bot online?
Mines is crashing when i got him online
what does the error say
show me the console
do you have any idea what you're doing
i recommend you check out a tutorial online, or this https://discordbots.org/blog/post/getting-ready-for-bot-development
https://anidiots.guide is good too
Ok
Tutorial series about making a Discord bot in C# .NET. Having a problem? Join our Discord and ask: https://discord.gg/R9j8DJF
this one is gud
K
is if role in member.roles: a good way to check if a member has a specific role in the server?
yes
thanks
https://gyazo.com/491ad36513662c47c425f49d977e88bf [JavaScript] ok so how do I limit the seconds to only 2 or 3 decimals?
Math.floor() or Math.round()
if you want specific decimals still, you can use .toFixed([number of decimals]);
you can ask them to change it to something else
Ok thanks
how do you use on_member_update exactly? I don't understand the before and after parameters
before is the member before the update happened
after is the member after the update happened
I understand that, but I don't udnerstand how I can use it
lets say I wanna do something when a specific role was assigned, how would I do that?
i assume the before and after are just simple member objects
unless roles are weird and dumb with your lib (I assume py) you can just get roles from those member objects
that doesn't explain much
before.avatar_url returns the avatar of a user before while
after.avatar_url returns the new avatar after updating it
before and after are member objects
you're trying to do something with role data, right?
just get roles from member object
so you could do before.name, before.roles, etc
I know that already, but how would I do that in action? like an example code would be helpful
and that'll return the name and roles before they changed
they are member objects, the before and after parameters. That's what you asked, what are those
I probably worded incorrectly, I'm just tired today
What do you want to know exactly?
how would the code look like in action, pretty much
I don't have a sample
@bot_event
async def on_member_update(before: Member, after: Member):
if before.roles.has(something): await doStuff()
idk anything about py so go ahead and translate this into real python
you don't need to do :Member for the params
whatever
async def on_member_update(before, after):
if before.roles != after.roles:
await channel.send("Roles have updated for {}".format(after))```
that's a simple example
you'd have to define the channel though
Deive is not that newbie in Discord.py. Let's hope he realises that. 
you split your connections to discord
.py
didn't found anything about sharding in the doc
maybe it's not supported by the lib
Are you on async?
yup yup
If so I recommend refactoring to rewrite
And instead of discord.Client() you can use AutoShardedClient
Or AutoShardedBot for cmd extension
Go to the docs and replace latest with rewrite
Tho, you'll need to refactor a lot
Since the syntax is different
But it's a lot better
also old py is old, I wouldnt be surprised if half of it was deprecated
Does anyone have their bots using a queuing system for message sending?
Well not implicitly, discord py will keep track of ratelimits
Its great so when you reach a limit it'll just wait till the limits over to send the next message
Explicitly
Ah
No it'll stop just before the limit
I use a custom fresh library for mine
You don't want to hit the limit
I mean for mine
yah ik
I meant for the time
Like sending too fast
It has a throttle but I guess I only did that because I dont use a library thats pre-built
lol
I already do that I was just asking
Keep in mind that parameters are counted
If anyone else is using a queue system
So posting in channel x does not affect posting in channel y
right
I meant it for discussion btw.. I actually already do all that ^^
brb going out for lunch ๐
Enjoy
Can someone tell me what's wrong with this invite link?
https://discordapp.com/oauth2/authorize?client_id=349966335352242187&scope=bot&permissions=8&response_type=code&redirect_uri=https%3A%2F%2Ftwilightbot.eu%2Fdocs
Im trying to redirect the user as soon as they added the bot
Have you added the uri in your bot application
that as well ^
what do you mean with bot application?
Does your website required specific headers?
Well you already did sort of... ban this man!
Nah jk. Someone had a similar issue a day or 2 ago
I wonder if its the same thing
did you add it to here https://media.turtle-bot.com/f/kKtyL.png
ok, a little info... I re-apply tomorrow. My bot goes offline for problems, tons of bugs and fixing, so i decided to put it online with the [DEV] bot.



