#development
1 messages · Page 1877 of 1
you need to know how to use python to understand how to make a bot in python.
you cant swim for the swim team without knowing how to swim first ^_^
not neccessarily learn python
worked for me!!
he's doing in python
and it was slow for you
shiv got very angry
yeah ik
I remember you taking weeks to learn concepts that take a few hours to learn
true
ohh
We both where quite active in this channel when 0exe was learning.
its how I started to learn py myself(even though I never used it kek)
yeah
and shiv
omfg shiv was so pog
he helped so much
ye
i was indeed stupid to do bots before learning python lol
sus
but it ended up okay ig
I am not
Quick question..
Why use that? Use a library like node-fetch
Did I forget JS or can I not access this.
I'm using var since I have no idea how tf I'm accessing it.
For antonyms.
You need to include that code inside the callback function
Inside response.on("end"), specifically
Alternatively, wrap the whole call inside a Promise and resolve the object on end
Honestly, just use a library to request
Bruh.. If I add that code inside that .on('end... I can't access randomAntonyms.
define it in a global scope then
you cannot access callbacks outside of its block
thats why you use promises
the only way to return the value back to the outer scope is to wrap it inside a promise and await it
whats the method to change nicknames in dpy?
@modern sable
handled by woo
@lunar lance
This
ok
help
for (const listenerFile of listeners) {
const listener = require(`../listeners/${listenerFile}`);
console.log(
"══════════════════════════════════════════\n" +
"Loaded: " + listener.name
)
this.on(listener.name, (...args) => {
listener.exec(...args, this);
});
}
``` I use this to get all the listeners working inside a certain folder right? the "this" is another name for the client, how can I make it so the "this" only works inside the other code I'm about to send and not in the other args that I am using as text for the event strings, please please I spent like 3 hours on this I cannot get it to work I beg you
```js
module.exports = {
name: "guildDelete",
exec: async (guild, client) => {
//code for exmple client.login(token);
}
}
``` the "guild" will the the "...args" in the code above and the client will the "this" so I can actually use the "this" as client to code some stuff. PLEASE
...anyone
make sure dev mode is on
So, are you trying to pass the client as a parameter so you can use it in the event listener as the client parameter?
If so, your code seems fine; what's the problem?
try
message.channel.send(`set the new message to: ${message}`)
instead, guess discordjs is being weird?
that's why I'm passing "this" to the exec thing
so it can execute the code inside the event
Completely ignored my question 
no clue, all other events seems to work fine besides guildDelete and guildCreate, always says that cache is not defined, however in all other events client works as it should
I was just answering
._.
by cache not being defined
I use this piece of code
exec: (client, guild) => {
const channel = client.channels.cache.get('770505348339466250');
channel.send(guildJoined);
}
Have you tried logging what client returns?
And you're using (client, guild), not (guild, client)
yea it returns my manager, and to get client itself I have to do client.manager.client again, however in other events, with legit the same exact code client returns actual client
I know, I wrote the thing wrong there I actually have (this, ...args) in my code, that's why there is (client, guild) there

I know...
so is it impossible to fix and I am doomed for eternity or is there a simple fix I am too dumb to understand
cause I'm seriously injuring my brain right now
If it returns your manager then you gotta do <Manager>.client
whats happening with the discord bots? can anyone explain?
Why not just pass <Manager>.client to your event listener??
this
.on(listener.name, async (...args) => {
await listener
.exec(this.client, ...args);
});
You said it returns your manager, so your this keyword must be passing the manager instead of the client
whenever I try to console.log "this" in the manager it returns an object Object reference, tried to use json.stringify to read it but it broke the bot
I don't understand though, I have the same code in the "message" event right? I pass the same client to all of the commands, and somehow magically they all work
I'm confused
Can you show both of the message and guildDelete events' listeners?
sure
module.exports = {
name: "message",
exec: async (client, msg) => {
this is the thing in message event
I legit pass it to a code that executes commands await command.exec(msg, args, client);
and somehow it works and passes normal client as it supposed to be
but somehow it doesn't do that for guildDelete and guildCreate events
also this is the thing guildDelete has exec: async (client, guild) => {
sorry for the mess I'm just kinda tierd
been tryna fix it for hours now
you there? @earnest phoenix
That doesn't even show anything, just the parameters, I meant the code; if it works in other event listeners and not those 2, you're probably using something wrong
Sure I guess
why people say js is slow when it can do these
Not quite sure that is what people mean when they say its slow
kekw
do it in C
Ahhhh my eyes, eww Java
cry about it
I do 
not me with my dogshit c++ skills
lmfao
Hahaha… stop the jokes dude, I’m done 
Oh
If I do discordClient.guilds.cache I see the collection of guilds (see screenshot)
but if I use discordClient.guilds.cache.get(886299243114016808), I get undefined
why is that?
(discordjs v13)
Make sure to pass the ID as string not as integer
discordClient.guilds.cache.get("886299243114016808")
And always use fetch not get btw. as if the guild isn’t available in your cache already it will be fetched from Discord if possible
guilds are always in cache unless you tweak the cacheFactory
guilds are always cached 
Is this true?
It's already been shut down. So yes, it's true.
So I can't use YT to play music,mmm
yes
it says n/a
and I need it in js
not discord.js
i checked the document
there is only discord.js python java and other things
but no java script
this is discrd.js
nvm Ill just right it myself
and btw it litteraly says its discord.js in the code
Oh I see. Just post to the API directly then
how
Read the docs https://docs.top.gg/api/bot/#post-stats
ok
I'm getting an error whenever I run my code:
Traceback (most recent call last):
File "main.py", line 9, in <module>
import discord, os, shutil, asyncio, json, topgg, aiohttp, time
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/topgg/__init__.py", line 24, in <module>
from .client import DBLClient
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/topgg/client.py", line 36, in <module>
from discord.ext.commands.bot import BotBase
ModuleNotFoundError: No module named 'discord.ext.commands.bot'```
what is the converter for guild I'd discord.py
I tried guild.id
it didn't worked
Hello, anyone know how to delete a global slash commands ?
const Discord = require('discord.js');
const client = new Discord.Client();
client.on('ready', () => {
console.log(Logged in as ${client.user.tag})
});
const mySecret = process.env['token']
)
client.on('message', msg => {
if (msg === "ping") {
msg.reply('pong')
}
});
i keep getting the error
SyntaxError: Unexpected token ')'
help
why is there a ) under const mySecret = process.env['token']
also pls use codeblocks
whats code blocks?
i took it out and im getting SyntaxError: Unexpected token '?'
"this is code blocks"
which line
because i dont see any
the parenthesis under const mySecret = process.env['token']
sorry i still dont get it
im only three hours into coding and ion know shit lol
this is what its showing so far
u need node.js v16
it says 'ws' of undefined
hey guys has anyone got their bot verified here?
I need help in filling up the form..
thanks
hi
I'm trying v13 and I'm having errors
can anyone help 🥲
anyone here?
pls
v13 sucks
oh wait
still the same
Yeah I could try that, but now I am stuck with resetting the timer, You got any ideas?
v13 sucks
It doesn’t but you need to read the change log before updating something
@boreal iron ey men you smartest here probs, You know how to reset the timer of a collector so it resets every time it collects something?
Just use the existing method to do so:
https://discord.js.org/#/docs/main/stable/class/Collector?scrollTo=resetTimer
when you collect something reset it as easy as that
ok
I'm not able to update node
🥲
I use repl.it
is there any way to update node in repl.it?
For Replit User
npm i -D node@16.6.1
Do npx node index.js
Thank me later
or in package.json put 16.x
... thank you? Later okay ty
That wont work

Hi
shut up
omg omg pls give me
how would i fix this? trying to get my bot to send a dm to somebody
don't think that works in replit does it?
Go check announcment in repl.it support server. It works and they gave a shot out to me for telling them this way as well
you can but shouldn't
why would you even need to mix 2 formats?
they added support to it then?
forget, I'll add as a string then use json parse
Yes a support with 11k members
why is ctx gray (trying to get my bot to send dm to someone who uses the command)
not talking about support server, talking about latest note support
ctx is unused
what does that mean?
mean that it is not used anywhere
so how do i fix that
replit didn't support latest node version
you don't
oh
unused variable is not an error
so its supossed to be like that?
also no
the only way to get event info is through ctx
it's virtually impossible not to use it somewhere inside the event
For the past week, I've been doing slash command tests on a special server, so I was using the guilds commands and everything was working fine. However, today I want to publish them on the global commands but no command is displayed, what can I do? (PS: I have no error and I have successfully launched the file to deploy the commands)
My script when i push in global commands:
(async () => {
try {
await rest.put(
Routes.applicationCommands(config.clientId),
{ body: commands },
);
console.log(commands.length + " commandes viennent d'être enregistrés avec succès !");
} catch (error) {
console.error(error);
}
})();```
did u invite with slash scope?
use app command
how do i make this into something my bot can send someone a dm?
you need both bot and interactions scopes
oof ok thx
ok frick this im too dumb with python to make a bot whats a good site/app to learn python with?
some are
so i used this code, trying to make the bot leave the vc and delete the queue if it was alone in the vc after x ms (in this case 100) but it doesnt work, can someone help me?
code; https://srcb.in/W8UieqDp9H
why tf are u starting with math stuff?
I have been running the same code for 2 months. Can someone tell me why i am just now getting an error?
Does anyone have an idea
I am not tho. I can send all of the code, to prove this. Again, i have been running this for 2 months. Ever since i applied for top.gg with my bot, i have had some type of issue.
yay, slash commands almost done 🙂
now just gotta wait for the date where we can apply for message intent ig
if i use the raw http interactions endpoint for slash commands how do i recieve guild members and channel messages etc?
show the whole error
the most important part got cropped out
Let me open it back up
@lyric mountain ^
My friend is having this issue. He tried to get on top.gg but he don't got a Phone. Can you help him?
I did
Here
This the right picture
show where it is accessing guild
You cropped out the line that caused the error
Let me tell him
you dont?
idk
@quartz kindle am i doing a right thing by using cloudflare workers for a bot
i could use replit but mongodb uses the only available port so uptimerobot fails
Replit is fun lol
All the red is his IRL name. He wont uncover it
Full error log
look for a file that seems like you wrote it
I did not do this.
My friend did
Would you like to talk to him?
He cannot join this server
why?
lol
He dont got a verified phone number.
could be something like nqn
who doesn't have a phone number nowadays smh
That what i told him lol
buy a NÃO card 
@earnest phoenix @lyric mountain can you help my friend or not.
not without the code
event.js
can i DM you?
So i can make a group with my friend.
So you can help him
where we don't need to code
[9:51 AM]
we need to just simply do
Added to that is that comment ^
everytime my bot joins a server, it should send a message in the guild.systemChannel, usually it does correctly, but sometimes it crashes even if i have a trycatch, this is my code
try {
guild.systemChannel.send({ embeds: [
{
color: '#be2edd',
title: 'Thank you for adding me!',
description: `Thank you for adding me to \`${guild.name}\`!\nTo get a list of all commands type \`.help\`.\n **Note: the owner commands are not listed.**\n`, footer: { text: `The bot\'s owner can see all the servers the bot is in.` },
timestamp: new Date()
}
]
})
} catch (e) { console.log(e) }```
lol
the try catch is useless because you're not awaiting the send
send returns a Promise
that makes sense, im stupid
look, that's not helpable at all
const { SlashCommandBuilder } = require('@discordjs/builders');
const discord = require('discord.js')
const superagent = require('superagent')
module.exports = {
data: new SlashCommandBuilder()
.setName('chat')
.setDescription('Chat with the bot')
.addStringOption(option =>
option.setName('input')
.setDescription('The input chat with the bot')
.setRequired(true))
async execute(interaction, client) {
const res = await superagent.get(`api.popcat.xyz/chatbot?msg=${option}&owner=Kweeper&botname=Depression+X`);
const embed = new discord.MessageEmbed()
.setTitle('Chat with depression.')
.addFields(
{ name: 'Input', value: `${option}.`, inline: false },
{ name: 'Response', value: `${res.response}.`, inline: true },
)
.setColor('RANDOM')
await interaction.reply({ embeds: [embed], ephemeral: true});
},
};
unexpected token async
@hollow loom you're missing a comma
oh bruh
after setrequired
ok ty
ok
my man making a bot in unreal engine scripts
hi demoted team member
ngl, I really thought that was UE4
Can someone help me with my issue?
This. I did change my token FYI
your friend uses a botmaker, so only people that can help him are those who also use that botmaker
so he's out
My issue. With my bot...
you issue is ratelimiting
I sent my code error for my bot
What is that?
so i used this code, trying to make the bot leave the vc and delete the queue if it was alone in the vc after x ms (in this case 100) but it doesnt work, can someone help me?
code; https://srcb.in/W8UieqDp9H
And how have i never had issues beofre today?
How i fix this?
you don't, just wait
Again, it never happened until today.
For how long?
did u restart the bot a lot today?
No.
how many shards?
Last restart was yeserday
How do i see that?
My friend was testing it, to see my code, and did my prefix (c!) and it was not showing anything. I went in my code, and was turning the code on and off, i click "Run" again and this happened.
ok
bot.run('TOKEN IS HERE')
My token is on that line
@lyric mountain should I make a slash command generator GUI for detritus
I mean, around that line
like, 5 lines above and 5 lines below
why tho?
actually, how'd that work?
¯\_(ツ)_/¯
choose your command options and stuff, write the code that runs when it's used, done
other lines that contain code?
dot dot dot
lol
well, idk what to say
if there's nothing around bot.run then it's definitely a IDENTIFY ratelimit
I already made a working slash command options generator then deleted it so it can't be that hard
yesterday there was an outage in discord
that causes bots to spam api trying to reconnect
lol it's a detritus interactionClient.add generator
membercountembed.set_author(name="Current Member Count", url="https://servercleaner.deathjones.repl.co", icon_url="https://cdn.discordapp.com/attachments/853262975514968084/866659453617438730/server_cleaner.png")
membercountembed.set_footer(text="Server Cleaner", icon_url="https://cdn.discordapp.com/attachments/853262975514968084/866659453617438730/server_cleaner.png")
await ctx.send(embed=membercountembed)
#-----------------------------------------------------------------
@bot.event
async def on_guild_join(guild):
channel = guild.system_channel
embed = discord.Embed(colour=discord.Colour(0xd0021b), url="https://discordapp.com", description="Thanks For Inviting Server Cleaner, Read Bellow To Get Started With Me.")
embed.set_author(name="Server Cleaner", url="https://discordapp.com", icon_url="https://cdn.discordapp.com/attachments/853262975514968084/866659453617438730/server_cleaner.png")
embed.set_footer(text="Server Cleaner", icon_url="https://cdn.discordapp.com/attachments/853262975514968084/866659453617438730/server_cleaner.png")
embed.add_field(name="Prefix:", value="My Prefix Here Is c!", inline=False)
embed.add_field(name="Getting Started:", value="To Get Started With The Bot We Recommend Running c!setup. ***TO BE DEVELOPED***", inline=False)
embed.add_field(name="How To Get Help:", value="You Can Get Help By Doing The Command c!help Or Can Join The Discord Server.", inline=False)
await channel.send(embed=embed)
bot.run('TOKEN')```
How do i fix that?
all u can do is wait
People in my discord are blowing up, trying to use the bot
there's usually a header that tells how much time to wait
What do i say about this? I dont even know what Identify Ban is...
IDENTIFY is the endpoint used to connect to discord
you have a limit of 1000 IDENTIFY requests per day iirc
so that's how i broke my extinct lib multiple times while testing
if you can somehow grab the request itself u can see how much time is left to unlock it
idk why dpy doesn't state it tho
ok
you should try to retrieve how much time is left
How do i see that?
I dont know how to do that...
@earnest phoenix your turn
const ref = React.createRef();
ReactDOM.render(
document.querySelector("#root"),
<ChakraProvider>
<ChakraInput onChange={e => ref?.current?.innerText = `client.login("${e.target.value}")} placeholder="Enter your bot token" />
<ChakraText ref={ref} />
</ChakraProvider>);
wtf is that
lol
it's your fault you asked for it
Now suffer poor vue stan
Poor Kuuhakwooagboku
but jokes apart, he just need a simple login code to see IDENTIFY ratelimit retryAfter header
d.py doesn't show it
If you import chakra ui react and react dom properly
Browser with npm libraries
So confused
/home/runner/JS-Logger/index.js:2
ReactDOM.render(<ChakraProvider>
^
SyntaxError: Unexpected token '<'
Hint: hit control+c anytime to enter REPL.
Your code lol
lmfao
Nothing is happening
JSX needs to be converted to normal javascript with a bundler
How do i do that on replit
Also I am using npm libaries without requiring them
...
npx esbuild file.jsx --bundle --minify --outfile=bundle.js
Where do i add that at?
can't yall just use d.js or detritus
I know d.js a little better than this mumbo jumbo
i was working on a bot analytics page
How rude 
lol
Can i just get the JS code please.
pay 5$
idk d.js lul
we dont spoonfeed code here
https://discord.js.org/#/ imma just put this here
not the kind you're thinkin of
he got IDENTIFY ratelimited
ah
So...
we're trying to grab the retryAfter header
We are trying to fix this.
And, i dont know how to do it.
and he codes in python
i do not know if logging in via the bot would show the ban on the console
so we're trying to make a simple login code so he can see the full request
^
but idk d.js
its 24 hours isnt it?
and JDA would be too overkill
his users are angry so he needs to give some "we gotta wait XX time" answer
ok, i know what happened
he said the bot stopped logging-in today
so probably he left the code running during yesterday's outage
which spammed the api alas giving IDENTIFY ratelimit
Wait, there was an outage yersterday?
ye
When did it happen?
No it depends on how many times you exceeded the limit. My bot got blocked for 72h once.
@stray seal what did it say on the console?
@lyric mountain Here's a pure js version of the generator you never asked for
<input id="token">
<p id="code"></p>
<script>
document.querySelector("#token").onInput = e => document.querySelector("code").INNERHTML = "client.login(" + e.targrt.valur
oh spooky
the error code?
here. I changed the token alraedy FYI
Each time you try to identify beyond the limit the timeout increases
whenever an outage like that happens many bots get locked out afterwards
I always shutdown the code until it settles
AM or PM?
neither, that's 24-hour
I did not even know that TBH.
This is my first time this happening.
Under the picture.
Is that the code we needed lol
...that's not the issue
py doesn't show how much time left until ratelimit goes away
we're tying to retrieve that time
actually
you could just make a http request to discord
thats what I was thinking, but wasnt sure what you need to identify
login bot
That's not what I mean. You get rate limited after the 1000th identification within 24h. Each attempt beyond 1000 will increase the rate limit timeout. So 1001 will add some extra time to wait, 1002 will add more, 1003 adds more again. So basically your timeout could be longer or shorter depending on when you stopped trying to identify. In my case it blew up to 72h because my bot had a stupid simple error loop because of an unavailable guild in the middle of the night and it got stuck in the error loop until the morning. That's how I ended up with 72h to wait, because it had done well over 1,000 identify attempts.
have you tried using a sleep function?
most libs try to reconnect after losing connection to api
What that?
i mean that's to solve the rate limit in the future
during outages, it results in infinite loops
Is this what i need?
If you want to send a manual identify request
What is this code for?
it temporarily delays an execution
???
It's the payload you have to send to identify yourself.
...he probably doesn't know how to send http requests tho
lemme simplify, it times out the request for a certain amount of seconds, it kind of helps reduce a chance of being ratelimited
How i find my intents?
lol
I really dont
in this case you dont really need to worry about the intents
Kinda new to code.
Is my OP, 2?
What is that..
if it will take about one week to review someones bot, my bot isnt hosted 24/7 because it is using uptimerobot and requires network 24/7
so will it be declined if not online 24/7?
it needs to be up when we review it.
to be real, I'm starting to think that d.js will be easier for that purpose
it doesnt need to be 24/7(but really should be)
brb
oh because im trying to look for a host that will keep it up 24/7
paid ones
a vps
i dont have the money tho
repllit won't keep everything up
so basically as long as the bot is online when you guys are reviewing it it's ok?
i use replit as a sandbox for code testing though and regen bot token after everytime i'm done
yes
U never know when it being reviewed
yh but i can put my pc on as soon as i arive at home
because it will be online if the pc is on and is getting network
Is it safe to assume that I have to serve my vue package as static file on my website for it to work?
const { Client, Intents } = require('discord.js');
const client = new Client({ intents: [Intents.FLAGS.GUILDS] });
client.once('ready', () => {
console.log('Ready!');
});
client.once('rateLimit', RateLimitData => {
console.log(RateLimitData.timeout, RateLimitData);
});
// Login to Discord with your client's token
client.login("TOKEN HERE");
should do for getting your ratelimit data
It loading
if it login sucessfully then it's an error in ur code
if not, the error will contain how much time left before ratelimit goes away
Here
Outdated node version
repl 😠
No it is not.
always making life hard
Only thing i have :c
node -v
Yes it is
???
djs v13 requires 16.6.0
Use nix repl or tim's way
There’s a couple methods to update node on replit
???
How?
try node 13.x and discord.js ^12.5.3
No
I am a PY user lol
Don’t do that
What do i do then lol
i fixed it that way
I don’t know how to update replit’s node version, I don’t use it
But I know there’s a couple ways that exist
replit doesn't support the latest version
Yes, but you’re downgrading your version for no real reason
It doesn’t by default, but there’s some ways to trick it into getting later node versions
actually i do. the new slash commands make me lose braincells
What do i do?
The new slash commands are going to be pretty much forced by April 2022
So.....
This ^^^
What is that?
Don’t worry about that rn
not a ratelimit then
What that mean?
read this @stray seal
Wait I saw something about line 600 or something
Can you answer this?
I have been running the same code for 2 months. I finally desided to upload to topgg. I uploaded it for review, and the bot went offline. No biggy, i turned it back on. Then, today my friend wanted to see it, ran the prefix (c!) and nothing was happening. I went inside the replit to see what the errors were, and there was none. I desided to restart the code, so i hit "run" to turn it off, then "run" to turn it on. After this, that is when i got all these errors.
discord.errors.HTTPException: 429 Too Many Requests (error code: 0): You are being blocked from accessing our API temporarily due to exceeding our rate limits frequently. Please read our docs at https://discord.com/developers/docs/topics/rate-limits to prevent this moving forward.
429
From the log.
So you were probably unratelimited
What is UNratelimited?
Like the rate limit was lifted
you did too many actions too quickly and got ratelimited
you likely caused an API ban
Check your code
You might’ve overlooked something
^^^^
Let me send my code
From what it looks like you’ve been api banned
Too many requests
(Temporarily at least)
The thing is, i have not done to many.
What and how did u do it?
Idk, only u know what u did to get ratelimited
My code.
You dont get ratelimited for no reason
I dont though.
Ew dpy
not exct same
Make it then
@earnest phoenix DM me.
ok
@hybrid cargo, i dont think it is ratelimit, we ran a code a there is no errors on the code. It logged right in
@lyric mountain
429 is ALWAYS a ratelimit
The thing is you were. You got your rate limit lifted
Ur error message clearly states you have exceeded the rate limits
you want to make a competing website to top.gg? so you come to topgg on how to make it? 👀
💀
Frequently hitting more than 120 requests per second
no
Interesting
lol
well, first u gotta wait till u get unblocked. second find which code of urs sends multiple requests. Or find if ur bot is running on multiple instances
I dont see where it does that.
How do i see how long for my unblock?
I never had this issue on my other bot (Demox), and it has THOUSANDS of lines of code...
Welp... i have no idea since
lines of code is not the number of api requests
code lines doesnt necessarily mean that it should hit ratelimit
^
@solemn latch look at this:
I said "Can i see you code?" (to that kid)
They said "I cannot show you, as it is private. I want this like top.gg."
HAHA
OK
Let me see if my team can find the issue
Is there a way to find out how long until i am unblocked?
are you still getting the error?
Where? On the code? Let me see.
Yes, still getting the error
What is that?
I click run, i get the normal Bot starting up Code, then it shows that.
for example, if someone runs a command 3 times in a few seconds does your bot stop them from running more?
someone easily can just spam your bot with commands until it hits ratelimits if you dont
I don't remember putting that kinda code on my bot.
possibly it then
are you spamming presence changes?
My test server, the Bot Emoji Server, and the Main
or spamming anything on startup
are you sending messages on startup?
Nope
does py have a ready event?
do some basic logs during it to see if it runs
I start sending 3 minutes after i see the Bot Info (how many servers it is in, members, etc. I have it showing in the Console lol).
I dont think it does...
py definitely has a ready event
op actually probably this one https://discordpy.readthedocs.io/en/stable/api.html?highlight=ready#discord.on_ready
I dont have a shard ID
discord.on_shard_ready(shard_id)
Similar to on_ready() except used by AutoShardedClient to denote when a particular shard ID has become ready.
Parameters
shard_id (int) – The shard ID that is ready.
ok
you already use the ready event anyway.
@bot.event
async def on_ready():
await bot.change_presence(activity=discord.Game(name='c! | https://servercleaner.deathjones.repl.co', url='https://www.twitch.tv/discord'))
DiscordComponents(bot)
print('Server Cleaner Is Ready!')
print(len(bot.users), " Members")
print(len(bot.guilds), "Server/s")
is all that logging?
does discord.py use cache?
yep
Added on_ready and it worked :D
Thanks!!
lol
probably just needed to restart your bot
Off topic, but turns out making my own recursive version of Math.pow in Java is 5x faster than the built in Math.pow
1795 + 2039 = 2040

https://i.woo.pics/cc63c40d2d.mp4
Interesting
Yeah, it worked
Probably because it takes the power as a double whereas mine takes it as an int
I have a problem can anyone help
actually I have created a game in discord.py tic tac toe
when i play for second time it is not responding can anyone help
weird
Because mine can’t calculate powers that aren’t whole numbers
Either that or I’m benchmarking it completely wrong
anyone?
Literally running 10^4 1 billion times and comparing how long it takes
My function takes 4000ms whereas Math.pow is taking 19000ms
You didn’t provide a very specific description of what’s wrong
Your bot could be not responding for a billion different reasons
Also I dont think a ton of py devs are on right now.
Well, “death” of dpy
what happened to dpy?
ah
Yeah
The actuall creator of discord.py is retired now
People have made their own forks and stuff
Thats why
any other python packages?
There’s probably a different library
ah
imagine djs dies 👀
The world would be saved
then i would be screwed
Tim would save us
tbh probably would be good for js devs long run.
although it would save me my braincells
Probably
tims new lib would actually save us
It would give more attention to the smaller libs with really good features
you know what, i should make my own discord package for a different programming language
c# needs a new one from what ive heard
fine
One message removed from a suspended account.
C# has a couple libraries
One message removed from a suspended account.
One message removed from a suspended account.
I thought Remora and D#+ were good already
One message removed from a suspended account.
what programming language doesn't have a discord package
One message removed from a suspended account.
tf is that
One message removed from a suspended account.
One message removed from a suspended account.
oh
One message removed from a suspended account.
One message removed from a suspended account.
F#
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
Where’s my Scratch library
scratch has one
One message removed from a suspended account.
One message removed from a suspended account.
wtf scratch?
its called Scratch for discord
vuejs?
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
its scratch based isnt it? as scratch is open source
One message removed from a suspended account.
One message removed from a suspended account.
Brainfuck
lel
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
It is based off the company "Scratch". It is a code place for making Intros, Games, etc. I used to code there. Is the Discord one good?
Oh god
no its not good
One message removed from a suspended account.
One message removed from a suspended account.
i can't believe someone coded that
One message removed from a suspended account.
do i try? lel
anyone made a bot in lolcode?
One message removed from a suspended account.
would be fun
One message removed from a suspended account.
What about Moo
moo 😠
you can probably import c++ libs in lolcode
C++ is a brainfuck enough in itself I don’t need some sort of abstraction on top of that
One message removed from a suspended account.
One message removed from a suspended account.
imma become a zig package developer
One message removed from a suspended account.
One message removed from a suspended account.
no
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
let's see how far i can get
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
too late
One message removed from a suspended account.
I am sorry for your eyes
function isTriangle(a,b,c)
{
return a + b + c > 0 && !(a >= b + c || b >= a + c || c >= a + b);
}
nice
oddOrEven=arr=>arr.reduce((a,b)=>a+b,0)%2===0?"even":"odd";
i want to maake website like top.gg
you'll need to learn programming, html and a framework of your choice to get started
I suggest starting with JavaScript
downhill learning curve
i lnow html
know
usual pattern: html -> css -> js -> react / vue / any other framework -> nuxtjs / nextjs / gatsby
that's just frontend
explain what an html tag is
because my computer class never taught us in the entire 1.2 years i went there
i show you my code
see
Zig packages are just Zig source trees, requiring a root file.
Packages are imported with @import("package-name") without the .zig extension.
Packages have the same visibility rules as other source files, they just don't need to be in a relative directory to your own source tree.
Each package has their own dependencies, so packages might use a same-named package that is backed by different source files.
got that from documentation
good job
use your html skills to make a website like top.gg
¯_(ツ)_/¯
but whayt about api
watcher
login
@earnest phoenix
you need to learn backend for that
🤔
ohh
im very new
backend = stuff that runs behind the scenes on the server
frontend = your website
weird, probably the ratelimit ended during the time we were trying to solve it
but nice job
hi kuuhaku
you came just in time for another cursed code block of mine
should I do the honours?
aw shit here we go again
nah, that's mild
One message removed from a suspended account.
isn't it %b?
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
damn wasn't as frightening as I thought it would be
One message removed from a suspended account.
so take this
<ChakraProvider theme={extendTheme({
config: {
useSystemColorMode: false,
initialColorMode: "light"
}
})} />
spot the problem
One message removed from a suspended account.
One message removed from a suspended account.
in java too, was talking abt printf
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
you cant directly print a boolean in c?
One message removed from a suspended account.
Question for the bot devs, are you able to import tables from websites that contain data and put them into channels ?
One message removed from a suspended account.
One message removed from a suspended account.
something like this
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
i am, but i am a little confused by 'source trees'
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
You can scrap any webpage
One message removed from a suspended account.
But its easier to use an api
One message removed from a suspended account.
There is no boolean data type in c by default
One message removed from a suspended account.
ic
One message removed from a suspended account.
is it possible to develop one?
One message removed from a suspended account.
that'll import the data?
What exactly?
can I PM ? would that be easier?
Nope
after I discovered C doesn't have an easy way of getting epoch millis I don't get impressed on how raw C is anymore
that whole table
its from a website
but I want to import the data into a discord channel
it regularly updates & refreshes data at certain time periods
do they have an api?
You can use something like html parser or cheerio for scraping that data
not too sure, don't believe so
you know what screw it, my feeble brain doesn't do well with zig
I have 0 clue what I'm doing when it comes to programming/coding btw 🤣
Then learn that first if you want to make it by your own
I wouldn't mind paying someone tbf
Dblneeddev
@next rain
You seem to be asking for something you don't have experience for or something that hasn't been done yet, but really need for your bot/server.
You can hire developers from Fiverr or Freelancer to code the things you need for your bot/server.
i know a couple companies that teach programming
Wouldn't recommend paying anyone on Discord. That usually ends badly.
Use one of the sites above.
codeacademy, udemy, w3schools, mozilla, baeldung
do not start with me
I've tried fiverr already 🤣 most have been useless
I got ghost pinged...
not ghost
At least you have buyer protection



