#development
1 messages · Page 1405 of 1
bot token?
Do u understand 'register bot'
That kinda makes no sense
you are assuming right
you would use that method
No
uh
I only have missile codes, sorry
oof
@sour steeple im sorry, idk why they aren't giving you the registration bot code
no problem thx
I have no idea what he is asking for 
yeah i might just contact a moderator
cause that's messed up that they aren't giving the registration bot code
@tardy hornet
const role = message.guild.roles.cache.find(role => role.name.toLowerCase() === 'role name');
role.edit({permissions: 'flags'}).catch(console.error);
here's a link to the flags you can specify:
https://discord.js.org/#/docs/main/stable/class/Permissions?scrollTo=s-FLAGS
ty
np
@sour steeple anyway im messing with you, check this out:
https://realpython.com/how-to-make-a-discord-bot-python/
for a comprehensive guide in python
thx Im searching this codes
ty
Finally I have a ask
Is there a problem with the glitch website or just me problem
ok
Türkçe bilen varmı birşey sorucam
ama dbl sormam lzm size değil
botumda mute komutu ayarlamadan çalışmıyor bunlar mute çalışmıyor demesinlerde
wth is going on lol
im pretty sure it's english-only here
anyway saying "blank doesn't work" isn't really enough for someone to help you
how do i fix that problem:
huh?
that's not the error... that's just like saying "hey, a error happened"
screenshot above
can't find gyp file
no
then what?
npm install -g windows-build-tools from an administrator cmd or powershell
(run as administrator)
did you wait for it to finish? did it say "ALL DONE"?
i think i downloaded the 2015 one
you dont need to download it manually
run the command again
from an admin powershell
or cmd?
it will not install if its already installed
so you can use it to confirm that it is installed
,
as long as its admin
it will say ALL DONE
okay
python is done, but visual studio is installing
will it take like 10m?
its not saying that its done but its not showing anything moving
i guess i will wait the 30
its normal
yes it will "fix" it
sqlite is a C library, it needs to be compiled into an executable that node understands
thats why it needs build tools
some combinations of sqlite and node versions have a few "pre-built" binaries that can be downloaded instead, but usually recent versions dont have them yet, so it needs to be built from source
yes
alright, soooooo my bot was declined TWICE now for not having a working help command
what is considered a "working" help command?
a help command that works?
tim, it didnt work
show full logs
okay
i have even made my bot show the help command in the status...
does it work even if your bot has no permissions? besides sending messages of course
my bot doesnt executed anything if it doesnt have permissions and instead messages the owner to give the bot perms
what was the command you ran?
then thats why

if the user has dms disabled, he will never receive anything
1s let me recheck
help command should always work without any permissions, besides the basics
You can just check if the user has dms enabled.
Why?
cause its trapped in the verification limbo
and needed this boost to maybe someday get out of it
Don't delete it yet.
can you try creating a folder for the bot outside of your user folder? like C:/bothere
and try installing there
okay
maybe it cant read the name?
yes thats why i suggested it
how do i change the name then lol
did it work if you install it in a folder in C:/?
לול אתה מישראל
כן
show me
?
@teal egret DM me
50 שרתים
יפה
https://discordstatus.com/ @river thistle
ikr but nothings on it
what is the html color of the moderator role?
"html color" what
the #
hex
yeah
rgb(244, 68, 68) , actually.
Inspect Element is 
ty cry
message.mentions.members.first().roles.add(muterole.id);```
so im trying this but Im getting the error ```UnhandledPromiseRejectionWarning: TypeError [INVALID_TYPE]: Supplied roles is not a Role, Snowflake or Array or Collection of Roles or Snowflakes```
ah ofc mb
oop
looks like you should just replace fetch() with find() since roles are always cached anyway.
not with djs light
Eww.
Wdym eww
why ew lmao
Tim made that
so i have this https://img.rovi.me/9HovB55coF.png and it works perfectly, no extra bot processes are created but it runs the image editing in a new process so it doesnt block the main one. However, when i do this https://img.rovi.me/6Wpucqd3Si.png ( https://img.rovi.me/OsbKzDLwLz.png this is in another file, image_gen.py ) It does decide to create a duplicate process of the bot's main script which obviously isn't what i want. i have tried it with the ctx.typing to see if that makes a difference but it didnt either so i have honestly no idea why it is deciding to work inside the command but not when it is in a new file
How dare you disrespect tim
just use rust and then u have real big dick energy
What if I don't want a dick 
lmao
I'm just not a fan of disabling caches just for the sake of saving memory then having people go "oh why isn't this available" all the time. But, obviously, that's a personal opinion.
well, not everyone can afford needlessly large machines xD
I still do it anyway
Can somebody tell me how to host discord bot 24/7 free
If by "needlessly large servers" you mean 128mb RAM, then... we have a different definition of "large" 😂
My server has 2 gig 👀
@broken sentinel there are some other free hosting options, but the best options are
- self host
- get a raspberry pi
- buy a server
It can be free from visual studio code but my computer need to be turn on 24/7
You don't need vscode
You're just using the console
Wait what does the ba part of bash mean 
well, before djslight, my bot was using 800mb ram
Thicc
lol 128 is sooooooooooo small 
There are a whole lot of factors that can affect ram usage.
A massive one is caching literally everything
caching is the primary one
Why cache when you can smash
~ Dice, 2020
although discord did a good thing by disabling members from being cached at login if you dont have the intent
things arent as dire anymore
plus intents
lol. I'm looking at my stats and there I see it... that 1.4GB on a thing I haven't rebooted in 3 months. Probs a memory leak in my code.
Mind typing in neofetch
how many guilds?
oh look it just keeps rebooting.
@umbral zealot how much ram do you have lad/lass?
Eh, that's a pretty big server, I think 8gb on there? Used it to run a couple game servers over the years so I pay more than I really ought to
That's a lo-
That one was on 2 servers only so really it was a code problem. never updated to discord.js v12 so it just wasn't working probably.
I left the company I made that bot for and sent 'em the code, they can figure it out 😂
xD
Yes big brain
but discord.js does in fact waste a lot of memory
every 100k members is like 100mb, every 100k channels is like 60mb
Tim are you a react person or a vue person or an angular person 
Considering Etiket is on 60 servers including this one and only uses 98MB though...
Wait lemme see how much mine uses
have never used any of those
Dam
but im looking into svelte
if(!muterole) {
const Embed = new Discord.MessageEmbed()
.setColor(0xff009e)
.setDescription('You need to create a role called "Muted" First')
message.channel.send(Embed);
}``` its now outputting ```TypeError: Cannot read property 'id' of null```
you're still doing it wrong
.fetch() takes an id
it can only get a role by id
if you want to search roles by name, you need to use .cache.find()
ah ic
I remember a website that was like 3 days a month off 24/7
i tried just .find and it didnt work
it was like heroku or something
ty
@broken sentinel https://medium.com/@mason.spr/hosting-a-discord-js-bot-for-free-using-heroku-564c3da2d23f
could I possibly collapse this in a way, probably storing the runAndUptime = bot.channels.cache.get('ID'); inside a .json file such as my botconfig file?
you shouldnt be logging to discord in the first place
for error logging you should definitely check out sentry
cba to use paid software, I don't think it should be much of a issue to log into discord as its the only app I'm actively on, everything else I just dont use, it shouldn't have much errors as well as I simply re-write all of my code to d.js v12
there is no way to collapse that
besides using an object or an array
you cant store a channel in json, you can only store a string
aight
you could probably attach those somewhere tho
anybody know why this const bot = new Client({partials: ["MESSAGE", "USER", "REACTION", "CHANNEL", "CHANNEL"]}); makes message.author.bot null?
like client.runAndUptime = bot.channels.cache.get()
@astral yoke whats your discord.js version?
I could, but wouldn't that be essentially just the same as I'd have to define then error logs, every logs and all that
^12.3.1
you should update to 12.5.0
Okay, just npm install discord.js?
are you getting it from the old message or the new message?
im not to sure
client.on("messageUpdate", (oldMessage, newMessage) => {
console.log(newMessage.author.bot)
})
it errors with all my code that contains if(message.author.bot) not just message Update
messageupdate, messagedelete, anything that has if message author bot
messageDelete wont have it if its not cached
messageUpdate wont have it in the old message if its not cached
@quartz kindle so how would i properly cache it so it can check if message.author.bot?
db.delete(`sample_${message.author.id}`) @solemn leaf
fetch the user
let user = await client.users.fetch(message.author.id)
if(user.bot) return
can I make text thick in a footer?
i believe not
it just errors after error spamming console (node:18944) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'id' of null
which there is the code you gave me
so does that have todo with patrial message?
if i remove it it dosent error anymore
thats so weird
will this work?
try { message.member.roles.remove(role); } catch { };
like say if their isnt the role
fetch the message
but that wont work for messageDelete
its impossible to get more information about deleted messages if they were not previously cached
if(message.partial) await message.fetch();
if(message.author.partial) await message.author.fetch();
console.log(message.author.bot)
this should work everywhere else
for messageDelete you have to if(message.partial) return; instead
to use try catch you need to await the promise
try {
await ...remove(role)
} catch(e) {
console.log("failed to remove due to error:", e)
}
I dont need to add anything in the catch bcs if it fails that means their isnt the role
and I dont need to do that so
if you want to ignore the error its easier to use .catch()
message.member.roles.remove(role).catch(() => {})
its a one-liner
Would anyone be able to assist me in hosting my bot on glitch
I have every file, I need to file them in a directory and then run the main.py
I’m inexperienced
I love how sucks pp is automatically meaning it’s bad
🌈
Most out of context yet 
Just defending the 🏳️🌈
i wanna slap you so hard for this
Are VPS free
gare u good at it?
yeah
u dont use vs
i do
?
i just suggest moving to a vps instead of a free host
what vps
because 1st: there aren't many free reliable hosts
2nd: quality comes with a price
the provider mainly depends on what you want to spend
ok
i dont have money and i cant spend so ill stay using heroku
wish there were free bot hosting servers
That's understandable
sadly servers cost money and always will.
ty
inline=False
i have no idea then
could be my end problem
Can we see your code?
noice
i do have another problem tho sec
I'm about to approach you with an intent of murdering you
why is this not working?
You have lots of problem
it just sends an embed with the author field (server icon & name)
n the colour
I'm curious what that is but I'm in comfy bed
Which command?
comfy bed, best bed.
i am not really sure just wanted to make an economy bot for fun
download the txt file above
its too large to be sent here
Yeah and all of them? cash, bank. etc.
yeah those dont send
Hm
only the author
Just to see that you're receiving the data properly
ye i understand u
and i wanted to do that
but kept it as the last choice
cuz its boring af
How can you get an amount from a value
wdym?
Never mind
Python 
cash is a value and cashName, startCash are other seperate values
if thats what ur meaning
or i am just dumb
OH if cash is True
damnit
i check if the key is "this"
and if it is
then "this" is its value
basically reading the db
if i was using json or smthing
i have to get "cash" value to check if its True or False
Is it an int?

But startCash is value
What the fuck
am I not understanding this correctly
Frankly, I'm lost just by reading this chat
lemme show u the db to understand
basically setup is a dict
i look for the key n values of it
if the key is "cash"
then my cash variable inside my cmd
is "cash" s value
so basically my "cash" value
is the value of my variable cash
inside my cmd
now
understood?
@slender thistle Does this make any sense to you
cash = True
cashName = "Cash"
cashIcon = ":dollar:"
startCash = 0
bank = True
bankName = "Bank"
bankIcon = ":credit_card:"
startBank = 0
leaderboard = False
leaderboardName = "Leaderboard"
leaderboardIcon = "null"
userPerPage = 5
shop = False
shopName = "Shop"
shopIcon = "null"
itemPerPage = 10
those are variables i defined in my code
basically i am getting the value from my db
if key is cash
then later
if key is bankname
and putting it to these vars
i am looping over all the keys in my db and if the key name is "cash" then i define its value to my cash variable
and then same thing for the other keys
and if its value is True then i read the stuff related to it
else i pass
understood?
🤣
it makes sense on my head atleast
There ain't a way key is cashName when it's nested in if key == "cash"
h..huH?
Lmao
The snippet flaze sent
ok u know what i'll make seperate childs inside the setup child and then loop over the child and its values and then check if the child is "that" and get "that" value
will loop better anyways
if that makes sense to u
If it works, it works.
how do you get the name of a deleted channel?
because the event returns a partial channel obj which has Undefined as the name
uh so there is no way to get it?
i tried fetching the name from audits, but still undefined
damn
it actually
didn't work
alr back to work
if i make a function
that returns either False or True
how do i check if it returned that or that?
if(function()):
doesn't seem to work apparently
if function():
aha
makes sense
somehow
a
def getCash(ctx):
cashName = "Cash"
cashIcon = ":dollar:"
startCash = 0
setup = db.child("guilds").child(ctx.guild.id).child("setup").child("cash").get()
setupval = setup.val()
if setupval is None:
return False
for key, value in setupval.items():
if key == "cashName":
cashName = value
elif key == "cashIcon":
cashIcon = value
elif key == "startCash":
startCash = value
else:
pass
return True
@commands.command()
async def test2(self, ctx):
embed = discord.Embed(colour=discord.Colour.gold())
if setup.getCash():
embed.add_field(name=f"{cashIcon} {cashName}", value=f"Starting amount: ``{startCash}``")
embed.add_field(name=f"~~Cash~~", value=":x:")
embed.add_field(name=f"~~Shop~~", value=":x:")
embed.set_author(name=ctx.guild.name, icon_url=ctx.guild.icon_url)
await ctx.send(embed=embed)
Command raised an exception: AttributeError: 'function' object has no attribute 'getCash'
see what i ment by "stupidly smart looking"
setup is a function
righhhhhhhhhhhhht
i knew ur a genuis
Command raised an exception: TypeError: getCash() missing 1 required positional argument: 'ctx'
it doesn't need self does it?
because if i add it it causes another error
Command raised an exception: TypeError: getCash() missing 2 required positional arguments: 'self' and 'ctx'
It requires ctx and I don't know why you made it require it
wdym
See the function parameters
i need ctx for ctx.guild.id
Since getCash is a method, it requires self, ctx to be its parameters
But you only pass ctx
that gives me another error
Command raised an exception: TypeError: getCash() missing 2 required positional arguments: 'self' and 'ctx'
^^^
😆
Oh
if getCash():
Dear fuck God
oh no
Is it a classmethod
i messed up very bad didn't i?
Not really. Just a small flaw in the logic
its inside a class if thats what u mean
inside the Setup class
i changed setup.getCash() to Setup.getCash()
or should i remove it?
Well
Here's the funny thing
If it's not a classmethod, it requires an instance of the class to be used
English please
See Google on how class/staticmethods work in Python
tldr google how OOP works
that too
Can some 1 please send the code for the embed thing. Using Python language. So I can compare mine to. Bc idk wat i did wrong
what did you do
how do I debug it??
discord.py docs m8
wha??
See https://discordpy.readthedocs.io/en/latest/api.html#discord.Embed
Why it isn't working should be your question
follow the docs, use a debugger, print all errors you get
Don't ask what. Ask why.
at least they're willing to debug in the first place
it makes my blood boil when people act like you're their slave to find the error and fix it for them
What's annoying is when someone pastes their code, the error message, and nothing else. Not even a "why doesn't this work".
uhm...
Srry Im kinda new to coding.
So... Can some 1 please tell me what I did wrong here and how can I fix it??
async def displayembed(ctx):
channel = ctx.message.channel
embed = discord.Embed(
title = 'Title',
description = 'This Is A Description.',
colour = discord.Color.blue()
)
embed.set_footer(text='This Is A Footer.')
embed.set_image(url='https://danbooru.donmai.us/data/eea7e72b54ac9a60fb54b79e404a4639.mp4'),
embed.set_thumbnail(url='https://danbooru.donmai.us/data/eea7e72b54ac9a60fb54b79e404a4639.mp4')
embed.set_author(name='Author Name',
icon_url='https://danbooru.donmai.us/data/eea7e72b54ac9a60fb54b79e404a4639.mp4')
embed.add_field(name='Field Name', value='Field Value',inline=False)
embed.add_field(name='Field Name', value='Field Value',inline=True)
embed.add_field(name='Field Name', value='Field Value,'inline=True)
#await client.say(embed=embed)
await client.send_message(channel, embed=embed)```
you called it
client.send_message is not a thing anymore I think
told ya
dive deep there
its usefull
No
wait all i had to do is @staticmethod above my function? @slender thistle
I am learning from a 1+ gear old playlist on yt xdd
On... How to code xdd
Maybe
ah tricky boi
ok
it is Lucas?
Is there a way to get the traceback that comes up when reloading a cog to be sent as a chat message with Discord.py?
Yess
he has a newer playlist try it
I skipped cogs one tho
its called discord.py rewrite
My friend said wait until I know more coding
thats less outdated
Ok thxx
well yeah your friend is right
yup
you're trying to run before you can walk
How?
its kinda complicated to explain
look for it on the docs
look for exception & traceback
With those words?
try:
client.reload_extension(ext)
except Exception as e:
exceptiondata = traceback.format_exc(limit=1).splitlines()
~~do this line urself~~
~~do this line urself~~
if trace:
for key, value in trace.items():
await ctx.send(value)
``` @hasty mulch
thats an example
(unfinished)
And then ctx.send(embed)?
What do I call to send it?
i edited it
you need those 2 crossed out lines for it to work tho
figure them out urself
Hello.
Is there a way in the guildCreate event for the bot to create an invite when it joins a server and console log it?
why do u need such a thing?
I just usually like to ask the owners what they didnt like from the bot for them to remove it and how I can improve it in the future.
make that through a !suggest thing
but creating an invite for you to join through is a privacy breach
or have the suggestions in your bot support guild
mhm
if they don't post there, they don't care
both
follow official docs instead of youtube tutorials
man yt tutorials wont help u tbh
just mainly ask in help servers
and read the docs
and just mess around
hey
with what u know so far
Kk
umm does anyone know how to set up a winstond daemon?
wwhat?
What is that.
This was the basic template i found but im getting some super prototype error not able to figure it out
winstond?
winston logger http endpoint
instead of winston logging into a local file i want it to log into a server file
ah js
"winston" has the transporter.. apparently i need to set up winstond the deamon for it as well
the error is weird af man
when i use message.guild.members.cache.filter(member => member.presence.status === 'online').size i get numbers, but they're wrong. I use this same code for all online, dnd, idle, and offline, and all are wrong. I use discord.js
these are the cached users
damn the difference between py n js
(node:11) Warning: Accessing non-existent property 'Message' of module exports inside circular dependency
(Use node --trace-warnings ... to show where the warning was created)
You might be importing a func(f1) that imports another func from a diff file (f2) the func in f2 might be importing func1 from f1
This causes circular dependency warning
And the func won't work
I've experienced this
wdym
For example
how i would filter out the online members that arent cached then?
@rustic nova if i use static method it tells me my function is not defined. if i use class method it tells me that it requires the perameters and i dont even know if instance method is somehow useful or i am using it or not. (py)
note the error only pops int console in my host
Let's say I have f1.js that exports func1
And f2.js exp func2.
If func2 is using a func1 and you trying to use func 2 inside func1 that happens. This is what I faced tho you might be having a different issue
Yeah
If the message func exists
@wise quartz what's the error you're getting
when i run it on my pc theres no error
Can you show?
kekw
just the code we we're trying to fix and u told me to google OOP n stuff
so i tried staticmethod
and it didnt work
Fun
i am sure instance method is the one i was using
and i am not sure if i class method will help
which one should i be using
lol
Class method seems to be what you need but I'm very uncertain what could go wrong
ah ye i didn't use it correctly
so in class method i need c;s
cls
and @clssmethod
alr
You don't need cls though
owh its optional or what>
?
cuz it the docs it said u need it for classmethod
and self for instance method
and nothing for static method
alr gon remove it
Sec
f1.js
module.exports.func1 = () => {
// do something
func2()
}```
f2.js
``` import { func1 } from f2
module.exports.func2 = () => {
// do something
func1()
}```
you get that warning when something like this occurs
yup classmethod gives me ur function is not defined
either import func2 from a diff file or func1
are u trying to help me?
that means you haven't defined that function..
Meh, use staticmethod
ah
I forgot the damn difference between them in Python
Aye just dug up an article
thats so blury when i zoom in
Open it in browser
the img?
Yeah
Show how you're calling and creating it
ye sec
@staticmethod
def getCash(ctx):
cashName = "Cash"
cashIcon = ":dollar:"
startCash = 0
setup = db.child("guilds").child(ctx.guild.id).child("setup").child("cash").get()
setupval = setup.val()
if setupval is None:
return False
for key, value in setupval.items():
if key == "cashName":
cashName = value
elif key == "cashIcon":
cashIcon = value
elif key == "startCash":
startCash = value
else:
pass
return True
ignore the indention
its correct
@commands.command()
async def test2(self, ctx):
embed = discord.Embed(colour=discord.Colour.gold())
if Setup.getCash():
embed.add_field(name=f"{cashIcon} {cashName}", value=f"Starting amount: ``{startCash}``")
embed.add_field(name=f"~~Cash~~", value=":x:")
embed.set_author(name=ctx.guild.name, icon_url=ctx.guild.icon_url)
await ctx.send(embed=embed)
Pass ctx in getCash
why dont i just make ctx: typing.Optional[ctx] = ctx
or that wont work?
class Setup(commands.Cog):
def __init__(self, client):
self.client = client
my class btw
Aye nah won't work
alr ctx it is
ye worked buuuuuuuuuuuuuuut
Command raised an exception: AttributeError: 'bool' object has no attribute 'items'
now getting that
lol
Is this correct??
on_member_join
async def on_member_join(member): system_channel channel = member.guild.system_channel
await channel.send(f"Welcome to {member.guild.name}, {member.mention}!")```
how can I fix it??
ur indention is dramatically emotionally hurting to look at
Is anyone here professional in HTML iframes?
@bot.event
async def on_member_join(member):
await ctx.send(f"Welcome to {member.guild.name}, {member.mention}")
kk
do the specific channel sending urself alr?
How good is
what?
docs man
Discord Bot Maker is a powerful bot development tool for the #1 text and voice chat service for gamers: Discord. With this tool, you and your teammates can take your social experience to the next level!ExplanationOne of the most prominent features provided by Discord is the official support for bot accounts. In a matter of 20 seconds, anyone can...
$9.99
1435
how dare u send that
TRASHH
How good is it
these shits ruin the meaning of discord bots
Ik js, but for small bots that I don’t want to spend hours on would it be good
trust me its useless
I only onstalled that kinda thing once to see watHi it was. AND I INSTANTLY DELETED IT
THATS SHITT
What language do u know
U BETTER GO YEETUS DELEETUS ON THAT RIGHT NOW!!
python (ultra beginner) i'd say
^^^
Also do u know how to make it so when ur bot gets added to a guild it sends a message
py ye js no
Feck
Yes
then search there
Ok
@slender thistle
Command raised an exception: AttributeError: 'bool' object has no attribute 'items'
``` the function works but now i am getting that
ye host them locally
or purchase a vps or whatever its called
or just host them on one of those free hosting websites
does this work??
async def on_member_join(member):
await ctx.send(f"Welcome to {member.guild.name}, {member.mention}")```
should ye
what did u define ur client as?
Do I need to make another part of code that sends it to a sertain channel??
what
??
unicode were you responding to Dragon? I think you misread their question?
send me the line where u put the bot prefix
ye what i misread?
I believe they were asking how to get their bot to show it on mobile,
https://www.hostmybot.org/daddy
does that really work? ?
I got a question. I am willing to make an iframe on my top.gg bot, and in that iframe, Im willing to put my website on it. Any way I can make it full screen, and not a small thing?
<html>
<body>
<iframe src="https://attitudebot.xyz/"></iframe>
</body>
</html>
he asked how to get it online tho
yeah i think he was asking how to get it online on "mobile," though im not positive
comn read it....
ye idk too
How do I make embed messgaes??
With my bot
Ive looked everywhere on yt internet fruends in discord servers I tried myself to figure it out but... no hope xdd.
Any 1 have any ways i can get embed code to make embed messages??
aha...
...
this will take u directly to the discord.py embed docs
Saying nobody knows isn't helpful
telling me that isn't helpful either
Smh
we tied then
Anyways, you want your iframe to fit the viewport
There is a stack overflow thread that goes over it
I would eloborate but kinda hard on mobile
complicatedly understandable
@feral aspen #development message
self._context.run(self._callback, *self._args)
RuntimeWarning: Enable tracemalloc to get the object allocation traceback```
How to enable Tracemalloc
Thanks!!!
Np
Is this correct??
async def loop_function():
activity = discord.Activity(name=f"over {len(client.guilds)} guilds\nand {len(client.users)} users!", type=discord.ActivityType.watching)
await client.change_presence(activity=activity)
loop_function.start()```
are you just copy & pasting random code that looks cool
The man needs help, cut him a break unicode
or your doing something specific?
i just wanna know if he has something specific he wants to make or just playing around with code
not trying to judge or smthing
I syumbled across a website. with... 💩 tons of outdated code and I wanna see if any is correct
/ still works
aha
Also Im editing code aswell
Yeah it really depends on what's changed library wise
well you dont really need a loop for your bot presence you can just shove it in the on_ready event and it'll work
but you'll need a loop if u want to make the bot change status
but its api abuse so dont
unless its like every 5m
or smthing
ohh
lol
I know y its not working. Ummmm
How donI make my bots ststus to Watching
Xdd
ah nvm he's too young
What library are you using?
speak mah child
Current:
async def on_ready():
print(f"{client.user} has logged in.")
await client.change_presence(status=discord.Status.online, activity=discord.Game('》Prefix -《'))```
What I Want It To be:
Watching Prefix-
Ummm Ill send a sc
heree
Wtf
activity=discord.Watching ?
i forgot it actually
but try that
OMG he remind me of my start
i started with PyDroid 3 too
and watching Lucas too
that was a year n half ago
damn those old memories
Me out here 2 years ago making a shitty discord js bot and committing my bot token to github
WTH is that
an outdated tasks loop function
What is that software
Hype tf are you doing mate
here you pip install your imports thats not where u code
go to the coding areas
area*
change activity=discord.Game to activity=discord.Watching
srrybi was brain dead xdd
not sure if that gonna work
@weary torrent what is that tho
SaisnI need a module
lemme check the docs for watching precence
the program is called PyDroid 3
its a Python IDE
for mobile
Oh god
that page he had was to pip install libraries
man i created a bot and it got like 21 guilds
my first ever bot
all on mobile
damn
Cool
discord.Activity(type=discord.ActivityType.watching, name=message) @wise quartz
Also you probably shouldn't even be coding on mobile
@weary torrent
if(!giveawayDuration || isNaN(ms(giveawayDuration))){
return message.channel.send(':x: You have to specify a valid duration!');
}```
unless you must
it doesn't work
dont say that
everything can be done if ur passionate about it
That's why I added "unless you must"
jeez i talk gold
coding on mobile is ok, it's just a bit harder
Voltrex Master: i've been coding my bot with mobile lolllll
sometimes a coded on mobile too
Guys this is literally why I added "unless you must"
BULLYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
jk
;(
await client.change_presence(status=discord.Status.online, activity=discord.Game('》Prefix -《'))
how can I make dat watching??
activity=discord.ActivityType.watching
await client.change_presence(status=discord.Status.online, activity=discord.ActivityType.watching'》Prefix -《'))
await client.change_presence(status=discord.Status.online, activity=discord.ActivityType.watching, "Prefix: -")
lemme see how u add status
@weary torrent try that
if it didn't work then remove the string and try again
try different stuff
until it works
that way you'll learn better
I triedd xdd
did it work?
nooe
Jesus fuck
oh fuck nvm
never mind that's *args
I have to put amontbof guilds and the watching status to swap em xdd
fuckk itt
xdd
Let's see
Any 1 know how to make it say how many guilds its in??
len(bot.guilds) or something
To explain flazepe's advice, a client has .guilds property, which is a list of Guild objects (servers your bot is in)
If you were smart enough to get into advanced Python before discord.py, you would know that a list has __len__() function that returns length of the list
len is a short for length
