#development
1 messages ยท Page 1317 of 1
<Drive>:/Users/<Your Username>/appdata/roaming/.minecraft/saves/<Your World>
because some people dunno wtf is appdata
code
Win + R -> %appdata%
^^^^^^^^
thats just a myth
its not true. selfbots are amazing, and everyone should do it ||thats a joke, please don't ban me! don't make selfbots, its bad for your health. may this be a lesson, and don't do selfbots and drugs, stay in school kids||
%appdata%/.minecraft/saves/<your world>
Ah yes, the daily cancerous development
yes
very
you mean hourly?
to do what now?
this channel has been shitposting for a few hrs
Didn't I tell you

I did
Shiv you didn't say anything bruv

is someone know how to add animated emoji to bot message?
we told you
Use it's identifier
bcz <:emojiname:id> doesnt work
shiv is here to ||ban me for the joke|| educate us in something
TLDR; Lost access to bot acct, wanna switch my code to edit my db to my user id
it does
their are 2 convos going @ once
here, lemme get an example

wtf
bot send that
not emoji
fs.existsSync(path).catch();
TypeError: fs.existsSync(...).catch is not a function
but that's a catch block?

did i just see an invite?
@earnest phoenix #265156322012561408 message
for like 2 seconds
@earnest phoenix That's sync
click that link @earnest phoenix
it doesnt work for me
i dont have eval btw
catch can't be used on something that is not a promise
cuz ur bot doesnt have access to the emoji then
the bot must be in a guild where the emoji is on
yes?
existsSync => exists
hi
it does, just append a: to it
for this
ok
same deal, look
can someone help me pls dm me
@earnest phoenix #265156322012561408 message
Ask your question here
@slender thistle ๐
it does, the bot just doesnt have that emoji in cache
mhm
the emoji is on a server my bot isnt in(YET)
1 sec
@earnest phoenix when i have the bot create in discord developer portal then the next i have invite it to my server
how i start that bot that is olso online whit the prefix and the command
By making code?
how
imma slap them with the guide, one second
What library are you gonna make code with
@midnight quarry https://discordjs.guide/
read that
i read
good, read all
is that simple past tense or simple present tense
h
anybody know how to make bot send messages without commands in discord.py
please help
๐ฅฒ
What do you mean "without commands"
i mean lets say i have a flask website when a user fills out a form then the discord bot should log it in my server
Sounds like potentially collecting presence like data
Not sure discord would approve of that type of data collection
this is just an example
anybody know how to make bot send messages without commands in discord.py
@spiral crag u made server nuke bot wtw this discord tos against ok
@spiral crag u made server nuke bot wtw this discord tos against ok
@earnest phoenix depneds
if its for ur server
its fine ig
i have a function in my code which is called when someone fills out a certain form, i want a discord bot to send me a message
but i dont have the "ctx" variable to send messages
Not a py dev, but can't you just use a global variable with the channel you want to send the data to?
if i do fs.writeFileSync("yeet/lol/owo"); and the folders inside yeet aren't already there will fs create them automatically?
the biggest problem is when i need to run the bot, i need to use "bot.run(<token here>)" and use flask for a website backend so i need to use "flaskapp.run()". In either of those statements all code below it is ignored. so if flaskapp.run() is above bot.run() then bot.run() would not execute and if bot.run() is above flask.run() then the flask website would not work
the biggest problem is when i need to run the bot, i need to use "bot.run(<token here>)" and use flask for a website backend so i need to use "flaskapp.run()". In either of those statements all code below it is ignored. so if flaskapp.run() is above bot.run() then bot.run() would not execute and if bot.run() is above flask.run() then the flask website would not work
@spiral crag then run the server on a different process bruh
how do you do that
i do that for my bot so when the bot is down the website still stays there so people can chill while the bot is down
how do you do that
@spiral crag not a python dev sorry
@earnest phoenix dont think it does
In my case, I use an api between my bot and my website.
My plan is eventually to put all my bots functions behind an api and the bot and the website will both use that api to get info.
is there a full documentation on every single thing you can throw at pack.mcmeta in minecraft datapacks

there's languages and stuff
if i do fs.writeFileSync("yeet/lol/owo"); and the folders inside yeet aren't already there will fs create them automatically?
my name is happy so i am happy

Tabs vs spaces
@sudden tulip is that Notepad++ 
NP++ gang
LoL
i dont see where it's wrong tho
Notepad++ is a smol text editor it's NOT meant to be used as an IDE
yeah
wait
please
if i do
fs.writeFileSync("yeet/lol/owo");and the folders insideyeetaren't already there willfscreate them automatically?
just realized it doesn't
peachy are you a py dev
how do i fix that tho
okay am back
so
peachy are you a py dev
@spiral crag yeah he is
how with this emoji
the biggest problem is when i need to run the bot, i need to use "bot.run(<token here>)" and use flask for a website backend so i need to use "flaskapp.run()". In either of those statements all code below it is ignored. so if flaskapp.run() is above bot.run() then bot.run() would not execute and if bot.run() is above flask.run() then the flask website would not work
could you help me pachy
*peachy
with id
and <
@earnest phoenix you can't just yeet code at us with your terribly-explained question and expect us to help you
ok
@sudden tulip can you help me please
hey dose someone have a tut for setting up grafana for discord bot's
is anyone a python developer here
please stop begging for help
@spiral crag couldnt help u
you can go to stackoverflow where it's people's literal job to help
Messages have the delete option @sand dune use your bots libs docs to see how to use it
Same issue?
yep
I'm honestly gonna die because of fs
Did it do it
i guess i cant do is_me
try using this formatter extension
it can format most languages even better than VSC's built-in formatter
Yea! its working now
hello im trying to increase the tax rate of players by 1% if the money** reaches every 10,000.
what is the best way to implement an action every nth
hello im trying to increase the tax rate of players by 1% if the exp reaches every 10,000.
what is the best way to implement an action every nth
@earnest phoenix check it on EVERY SINGLE MESSAGE
||just kidding||
I like doing this stuff database side.
You can add a column with a flag for if someone is being taxed more
Since its exp it probably never goes down so once it's on it can stay on and you no longer need to check
If your on sql you should be able to do it all in one query.
hmm im in mongodb
is it feasible on mongo?
Since its exp it probably never goes down so once it's on it can stay on and you no longer need to check
@solemn latch i forgot to rephrase, exp is money. its money *
Then I would check every single time if they are over the amount.
i want to tax people in every 10k of their money 1%
If its important for development or for your bot to function
If its just "I want to see the names" don't think its the best idea
its fine if you make it only for you
its not fine if you allow other users to see it
Can't you just look at the guilds region?
is someone know how to make
I know how to make
changing status in discord.js
Docs cover it
Or the docs
No results for "changing status
at RequestHandler.execute (C:\Users\Pujya Kumar\Desktop\Thunder\node_modules\discord.js\src\rest\RequestHandler.js:170:25)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:12936) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:12936) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:12936) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'messages' of undefined
at Object.run (C:\Users\Pujya Kumar\Desktop\Thunder\commands\special\eembed.js:20:35)
at Client.<anonymous> (C:\Users\Pujya Kumar\Desktop\Thunder\server.js:92:17)
at Client.emit (events.js:315:20)
at MessageCreateAction.handle (C:\Users\Pujya Kumar\Desktop\Thunder\node_modules\discord.js\src\client\actions\MessageCreate.js:31:14)
at Object.module.exports [as MESSAGE_CREATE] (C:\Users\Pujya Kumar\Desktop\Thunder\node_modules\discord.js\src\client\websocket\handlers\MESSAGE_CREATE.js:4:32)
at WebSocketManager.handlePacket (C:\Users\Pujya Kumar\Desktop\Thunder\node_modules\discord.js\src\client\websocket\WebSocketManager.js:386:31)```
...
Py is bad for bots imo
const fs = require("fs");
module.exports = {
name: "eembed",
category: "special",
description: "edit embed messages",
run: async (client, message, args) => {
if (!args[0]) return message.channel.send(`You did not specify your id!`);
if (!args[1]) return message.channel.send(`You did not specify your text!`);
const text = args.slice(1).join(" ")
if (!message.member.hasPermission("MANAGE_MESSAGES")) {
return message.reply(
"**You need __Manage Messages__ Permission to use this command ** "
);
}
let m = message.guild.channel.messages.fetch(args[0])
let editm = new Discord.MessageEmbed()
.setColor(args[0])
.setDescription(args.slice(1).join(" "))
m.edit(editm)
}}```
Js isn't great either but whatever
What do you use?
what is the issue?
Js, but mainly because I'm lazy and its easy
Unknown message
@solemn latch Dpy is pretty easy too, ANd it comes with a defualt help command
but the id isnt unknown
Default help is in commando, but help commands take like half and hour to make anyway
You have to search through the client methods.
Its not google you can't just search words and find what you want
@earnest phoenix set interval
You can just use the guild.iconUrl or whatever the lib your on uses
Set interval isn't required for setting status
he never said that
const fs = require("fs");
module.exports = {
name: "eembed",
category: "special",
run: async (client, message, args) => {
if (!args[0]) return message.channel.send(`You did not specify your id!`);
if (!args[1]) return message.channel.send(`You did not specify your text!`);
const text = args.slice(1).join(" ")
if (!message.member.hasPermission("MANAGE_MESSAGES")) {
return message.reply(
"**You need __Manage Messages__ Permission to use this command ** "
);
}
let channel = message.mentions.channels.first();
let m = channel.messages.fetch(args[1])
let editm = new Discord.MessageEmbed()
.setColor(args[0])
.setDescription(args.slice(2).join(" "))
m.edit(editm)
}}```
he just said he wants to set a status
someone know if digital ocean is a good host for a music bot?
it will work well
at Object.run (C:\Users\Pujya Kumar\Desktop\Thunder\commands\special\eembed.js:21:21)
at Client.<anonymous> (C:\Users\Pujya Kumar\Desktop\Thunder\server.js:92:17)
at Client.emit (events.js:315:20)
at MessageCreateAction.handle (C:\Users\Pujya Kumar\Desktop\Thunder\node_modules\discord.js\src\client\actions\MessageCreate.js:31:14)
at Object.module.exports [as MESSAGE_CREATE] (C:\Users\Pujya Kumar\Desktop\Thunder\node_modules\discord.js\src\client\websocket\handlers\MESSAGE_CREATE.js:4:32)
at WebSocketManager.handlePacket (C:\Users\Pujya Kumar\Desktop\Thunder\node_modules\discord.js\src\client\websocket\WebSocketManager.js:386:31```
channel may not be defined
ok beacause know i am hosting o herocu free plan and it is horible
heroku is a pain with music bots, always has been
yea i saw it ๐
at Object.run (C:\Users\Pujya Kumar\Desktop\Thunder\commands\special\eembed.js:26:3)
at Client.<anonymous> (C:\Users\Pujya Kumar\Desktop\Thunder\server.js:92:17)
at Client.emit (events.js:315:20)
at MessageCreateAction.handle (C:\Users\Pujya Kumar\Desktop\Thunder\node_modules\discord.js\src\client\actions\MessageCreate.js:31:14)
at Object.module.exports [as MESSAGE_CREATE] (C:\Users\Pujya Kumar\Desktop\Thunder\node_modules\discord.js\src\client\websocket\handlers\MESSAGE_CREATE.js:4:32)
at WebSocketManager.handlePacket (C:\Users\Pujya Kumar\Desktop\Thunder\node_modules\discord.js\src\client\websocket\WebSocketManager.js:386:31)
at WebSocketShard.onPacket (C:\Users\Pujya Kumar\Desktop\Thunder\node_modules\discord.js\src\client\websocket\WebSocketShard.js:436:22)
at WebSocketShard.onMessage (C:\Users\Pujya Kumar\Desktop\Thunder\node_modules\discord.js\src\client\websocket\WebSocketShard.js:293:10)
at WebSocket.onMessage (C:\Users\Pujya Kumar\Desktop\Thunder\node_modules\ws\lib\event-target.js:125:16)
at WebSocket.emit (events.js:315:20)
(node:3692) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection,
use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
ay, finally, people will stop using it for bots maybe
25 server and it every 5 min went offline
new error
your fetching m but not awaiting it
fetch is a promise
so your m.edit is running before m is resolved
thanks woo
np
yeah
also, your not checking if channel exists(which it may not) so the first error you get will periodically happen still.
i m first
making the base code then i will do that
OP
it worked
@solemn latch but is their a method that will keep some old things same
Ok well Iโve brought my bot online once again
like color
color of?
embed
is someone know how to add how many servers bot are to status
ok
ye ye `
color of?
@solemn latch u know?
you can just use .setColor
but
you can edit just the parts you need to edit
and keep the rest
since the edit process just edits whats already there
unless you build a new embed, which is kinda pointless imo
As a last resort, you can also delete the message and resend it
no real need, the message you are editing already has the original embed
https://discord.js.org/#/docs/main/stable/class/Message?scrollTo=embeds
I need free vpn
split("|")
sure
Please if any developer here has experience with Heroku and the DBL api, I would appreciate a lot if you DM me. Thanks!
I did tell you what you needed to do @ripe ibex
and that if you didnt understand further that heroku support is your next best option
it will split those into
["text ", " args[2]"]
?
it splits it into an array
is slappey good to use?
log your text var
console.log the variable so you can see whats not working @next flax
Idk how to make bots ...
@solemn latch ok can you help me ?
i would look at faq first
everything is working
Ok @solemn latch
only i want to split them
also dont use var please
@solemn latch yes I saw
oh is that what he did, i didnt even see what he changed lmao
I'm not a teacher ๐คทโโ๏ธ
so exactly, js or typescript?
Ok
that doen't mean that he's a teacher
@dire obsidian hmm ok
yeah
@dire obsidian Yes
erwin does his stuff in typescript
ohok
Woo thanks for ur help my command is working great !!
wait what's the difference btw mongodb and mongoose
mongoose is specifically for js
iirc
theres a few minor differences between some things
on my third pot of coffee @dire obsidian
helping in 2 guilds in like 4 channels 
yeah
np
and bye gn gtg
gn man
Yes
client.on('message', message => {
let args = message.content.substring(PREFIX.length).split(' ');
switch (args[0]) {
case 'announce':
if **message**.author.hasPermission('ADMINISTRATOR') **return** message.channel.send(new Discord.MessageEmbed().setTitle('Announcement').setDescription(`@EVERYONE ${args[+1]}`).setColor("00ff00").setTimestamp())
message.channel.bulkDelete(1);
}
}
;
the bits in bold are red lined
idk what ive done wrong
thanks
``
client.on('message', message => {
let args = message.content.substring(PREFIX.length).split(' ');
switch (args[0]) {
case 'announce':
if message.author.hasPermission('ADMINISTRATOR') return message.channel.send(new Discord.MessageEmbed().setTitle('Announcement').setDescription(`@EVERYONE ${args[+1]}`).setColor("00ff00").setTimestamp())
message.channel.bulkDelete(1);
}
}
;
in your code, strings need to be in quotes
so which bits
I have put the quotes around it
still red?
around the string
Sorry im kinda new and i wing it through most of it
whats teh string ๐คฃ
i know i should learn all of it
yeah it is in quotations
its in the box
i need the slanted ones
so the args comes as a code
and not just text
yeah, did you do that?
yeah
Why do i get 0 with const Amount = client.guilds.size.cache?
you did it backwards @earnest phoenix
guilds.cache.size
this is why posting code in discord is a problem 
Still 0
you said whats highlighted, but discord highlights random parts of code
if (condition)
aye that worked
cheers bud
you should really be a mod
all i do is see you helping people
id deny it if it was offered
why tho
reviewing bots sounds annoying 
lmao 
mods are not here to help people with development, they are here to review bot applications xd
Hmmmm i guess where they should add another role like certified helper or something
idk just something to show
you know your shit
id take perms to use luca commands
no banning/muting or anything tho, i do enough of that already
im not even gonna ask 
yes time to get $1 everytime i tell some to do npm install python
that would be a sick way to make money though
just sit here helping people with issues
ez job
wait a minute...
python confuses me too. I am learning slowly by being in here
for someone who just wings it lmao
the thing with py is that it's master of nothing, even tho it's ez
isnt python meant to b e easy
yeah
the syntax also isn't for everyone (like me)
^
I luv my ; and {
syntax is easy to learn if you dont know standard syntax
I just try it error fix it try it error fix it then magically it works
where can you find tio api
tio api?
Is they are "or" command?
try it online
Like .hasPermmisions("ADMINISTRATOR" or " ")
sounds like dong(do online now guys)
hasPermission(X) || hasPermission(Y)
yeah
but i was wondering wether that ment you had to have all of them
so that admin and for example manage_messages not admin or manage_messages
do you mean like, an admin without also having manage_messages?
@earnest phoenix they dont seem to have an API, but their entire code is open source: https://github.com/TryItOnline/TioSetup
hasPermission shouldn't be taking in an array, but hasPermissions should
also jumping into the py convo, i freaking hate the stupid whitespace waste of space syntax, its completely stupid in my opinion.
apparently
if (message.author.hasPermissions(" "))
Isnt a command???
shouldn't be a command, god i hope not
author isnt a member
i mean
only members have permissions
function
but you have to use the member property instead of author
author is typeof User
not associated with the guild
So what would it be then
member property
I need a good js dev to help me
Because its not message.member
if (message.member.hasPermissions('ADMINISTRATOR' , 'MANAGE_MESSAGES')) return message.channel.send(new Discord.MessageEmbed().setTitle('Announcement').setDescription(`@EVERYONE ${args[+1]}`).setColor("00ff00").setTimestamp())
if (!message.member.hasPermissions('ADMINISTRATOR' , 'MANAGE_MESSAGES')) return message.channel.send(new Discord.MessageEmbed().setTitle('Error').setDescription(`<${message.author.id}> cannot use this as you dont either have the 'ADMINISTRATOR' Or 'MANAGE_MESSAGES' Role.`).setColor("00ff00").setTimestamp())
god i hate the code block in discord sometimes
wait actually?
hastebin op
hasPermission, no hasPermissions
you can check multiple perms with hasPermission tho
so hasPermission is overloaded?
oh i was thinking of using the permission property
boi i am a small brain right now
also why are you doing args[+1] you could just do args.join(" ") they work the same, just args.join(" ") makes more sense to most people.
i knwo im asking alot of questions but how do i make it to include everything after the 1st artgument
args.join(" ");
args should be typeof String[]. so you can use Array.join() method to append the items into a string.
i realized that args[+1] doesn't append
i don't think that is proper syntax, idk i am all over the place right now, at this point idk what javascript wants to do with its life sometimes
Lmao
Args.slice(1).join(" ") or something
what i sent before my small brain was being exposed
why would you slice. you are just removing an item i believe. it's just args.join(" ")
in the string ?
oh then use shift()
so its gonna be like
Shift and slice work the exact same way here
.announce <text body>
wait shit, shift returns the items 
well it removes, then returns the item it removes if called on. as you can see my small brain memory is running on like 2gb of storage left
Rip storage
Just args.slice(1).join(" ") will work
^^^
Since its what most people use
I'm in the middle of making pancakes so I'm only half watching the convo
i am just getting things ready for class, so i was like seeing this, and my small brain started to kick in when i didn't want it to.
Thankyou boys
np
So my music bot uses collections to store the queue if the bot restarts it clears the queue. How do i make the queue not delete after a bot restart?
Store it in a database
Thats a lot of data to store tho
Is it?
yes
Its just urls.
yes but i use lavalink which automatically has a info portion in the object
You dont have to store that, you just have it
It will also be less than the amount of ram you are using by a lot
how tf do i setup mongodb?
download the community server
just did
or use atlas
what exactly does sending data in the request body through POST requests mean
or just do alt f4
Alt f4 is my preferred dev solution
or just do alt f4
@earnest phoenix this is an help channel if you are not able to help then don't be the "funny" guy

ok sry dad
@earnest phoenix this is an help channel if you are not able to help then don't be the "funny" guy
@slender wagon this is technically a chat channel
this is not stackoverflow boy
i better go then
read the channel topic
mhm
k
where do u see trolling allowed
where do u see trolling allowed
@slender wagon here, but to a certain extent
Its mainly dont troll endlessly.
A joke or two isn't a problem.
so back in the topic
ok
how do i get started with this thing
my friend helped me to setup mongodb
my friend helped me to setup mongodb
@earnest phoenix thank god you didn't follow an outdated yt tutorial
@earnest phoenix thank god you didn't follow an outdated yt tutorial
@earnest phoenix no @fervent goblet helped me out
what exactly does
sending data in the request body through POST requestsmean
@earnest phoenix The HTTP POST protocol requires a content body that you're sending to an endpoint. That's the purpose of POST, which is to submit new data.
for instance, GET is to retrieve data like a webpage (index.html)
just ask the question
just ask the question
@faint prism thats it?
"Any Java experts around?"
python devs, identify yourselves
"Any Java experts around?"
@solemn latch yes, literally
Shiv does a bit iirc
Shiv does a bit iirc
@faint prism a LOT not a bit
heheheh
no like my question is literally: who here is a python dev
thats it, not asking for help or have another question
theres around 10 or so python devs im aware of that visit this channel sometimes
theres around 10 or so python devs im aware of that visit this channel sometimes
@solemn latch lol
well, most bot devs dont use this channel
ive only seen maybe 50-100 people in this channel for more than one conversation
F
I feel like you can make api requests to top.gg to see what libs bot are using
@solemn latch i think so too
tho, anyone here who knows python who can join my dev team, and work on a dashboard
there
proper question asked!
-nodev
@solemn latch yep
i already know the tag
dont even get a mod to do it lmao
its not even -nodev
its something else i cant remember
they should make a roll called tagger which can call tags
its not even -nodev
its something else i cant remember
@solemn latch i know what it says tho already
so dw
MODS DO IT HE NEEDS IT 
tho where can i go to find ppl to do stuff for free with no pay whatever working in non-approved working conditions
Generally, you cant
if you have an open source project, say your looking for other devs. the devs who want to contribute will
the only projects ive contributed to have been unique in one way or another.
tho where can i go to find ppl to do stuff for free with no pay whatever working in non-approved working conditions
hello?You called me? I am free.
lmao
Only if it leads to developing code โ๏ธ
dinner tomorrow night? @restive furnace
@solemn latch sure
Cool
what version of java is required to run lavalink?
"Java 11* LTS or greater required."
it suggest using java 13
14 has issues, 11 has issues, sometimes they work, sometimes they dont
openjdk uses diffrent version numbers right?
anyone know how to manage bot ram usage like make it "reset" without restarting the bot
ram usage increases as the things cached increases
but after restarts its okay
some libs allow more control over whats cached and whats not
discordjs doesnt give a lot of control over caches
ah okay
openjdk uses diffrent version numbers right?
not sure
theres a few things iirc you can do
so theres not much i can do but restart my bot every 24 hours to prevent too much ram?
would i have to change any code? like does it follow updates
not sure
@restive furnace yep nope, 8 = 8, 13 = 13 and so on.
hmm
intresting
tim trys to keep them as close as possible afaik, but some things will be diffrent @uncut river
thanks for letting me know!
const BaseEvent = require('../utils/structures/BaseEvent');
const GuildConfig = require( '../database/schemas/GuildConfig.js' );
module.exports = class GuildCreateEvent extends BaseEvent {
constructor() {
super('guildCreate');
}
async run(client, guild) {
try {
const GuildConfig = await GuildConfig.create({
guildId: guild.id,
});
console.log('Bot has joined the server, saved to the database');
} catch (err) {
console.log(err);
}
}
}``` Cannot access 'GuildConfig' before initialization
const GuildConfig = require( '../database/schemas/GuildConfig.js' );
const GuildConfig = await GuildConfig.create
oh
thank you i'll give it a try now
smh it was just a capital letter
that was giving the error
Canโt help you without code
-moreinfo
If you want people to be able to assist you, please provide more information, such as what library and language you're using, the code in question and what you are trying to do and/or what is causing the error.
you want the icon, or the icon url?
When i do guild.iconURL
iconURL({format:"dynamic"})
Thanks
iconURL({format:"dynamic"})
@uncut river no?
format: One of webp, png, jpg, jpeg, gif. If no format is provided, defaults to webp
{ dynamic: boolean }
async run(client, message) {
if (message.author.bot) return;
const guildConfig = await GuildConfig.findOne({ guildId: message.guild.id });
const prefix = guildConfig.get('prefix');
if (message.content.startsWith(prefix)) {
const [cmdName, ...cmdArgs] = message.content
.slice(prefix.length)
.trim()
.split(/\s+/);
const command = client.commands.get(cmdName);
if (command) {
command.run(client, message, cmdArgs);
}
}
}
}```it keeps on throwing me this
the command does work but it just keeps throwing that error
https://hastebin.com/toxanisuxa.typescript is this code very inefficient or is it actually good
findOne is returning null
yeah sure
how to make @botname?
So... im trying to make a command that generates this
, using the users pfp or "attach files"
and my knowledges of canvas or gif encoder are poop
do you have the hand asset separated somewhere?
the sprites?
ye
yep
you can just load the persons avatar using loadImage
then for each frame of the hand put the loaded image down, then the hand(so its on top)
if you want the pfp to move, you can offset it slightly or deform it slightly
the problm... is that I have no idea how to do that
I would start with just canvas then, do the gif stuff second
I already did some stuff with canvas, is the gif part what breaks me
I nailed the hand moving but for some reason at the end it has a black frame
dunno why
potentially your doing more frames than the hand gif has.
so just doing one less frame should do it.
k ill try
the gif you showed had 5 frames

I need help fixing
at module.exports (C:\Users\Samst\Desktop\RemindMe\node_modules\ms\index.js:34:9)
at Client.<anonymous> (C:\Users\Samst\Desktop\RemindMe\core.js:46:22)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
Error: val is not a non-empty string or a valid number. val=undefined
at module.exports (C:\Users\Samst\Desktop\RemindMe\node_modules\ms\index.js:34:9)
at Client.<anonymous> (C:\Users\Samst\Desktop\RemindMe\core.js:46:22)
at processTicksAndRejections (internal/process/task_queues.js:97:5)```
when running
```js
const collector = user.dmChannel.createMessageCollector(filter, { time: 600000});
await collector.on('collect', async m => {
global.schedulecollectedTime = m.content
await global.schedulecollectedTime === m.content;
if(m.content === "cancel") {
let cancelEmbed = new discord.MessageEmbed()
.setTitle("Cancelled.")
.setColor("#FF0000");
user.send(cancelEmbed)
console.log("User cancelled collector.");
return;
}
console.log(`Collected ${m.content}`);
collector.stop();
});
await global.schedulecollectedTime !== null;
let msTime = ms(global.collectedTime)
const time = Date.now() + msTime```
You're unnecessarily awaiting some expressions in your code.
okay
but what im pretty sure is happening is my msTime isn't waiting for the first function to finish
Your error likely comes from this line: let msTime = ms(global.collectedTime)
Where did you assign collectedTime to global in your source code.
I wouldn't recommend assigning any property to global unless you really need it to live throughout your program's lifespan.
Hey how Can i say to mโy bot to join a Channel where i am wath an script and to do some music
you just say "hey bot, join a channel and do musics for me and the boys"
Hey how Can i say to mโy bot to join a Channel where i am wath an script and to do some music
that's called google assistant and spotify
@gritty bolt i mean the error tells you what the issue is
i dont get how to define it tho
whatever you're passing to ms() is undefined
that's running right after you call on
on() isn't a promise, it won't block, there's no need to await it
how do I not do that
it's an event for a reason
i want to wait
do your logic in the event, not outside
you should also stop slapping await on everything you see
read up on how async/await works
How would i give a role to a user if i have the id of the role?
This is in discord.py
docs would explain it
i cant find it in docs
if i find it instantly not being a py dev ima be mad at chu 
^
TypeError: Cannot read property 'channel' of undefined ``` Um, what?
?
const user = msg.mentions.users.first();
if (!user){
return msg.reply("Please mention someone to kick :)")
}
if (user) {
if (ReasonForKick.lenght < 1)
return msg.reply("Please supply a reason for the kick :) โ")
if (!msg.guild.member(user).kickable)
return msg.reply("Uh oh... I can't kick this person! โ")
msg.guild.member(user).kick();
console.log(`New kick: \nTarget: ${user.tag} \nAdmin/Moderator: ${msg.author.tag} \nReason: ${ReasonForKick} โ
`);
const KickEmbend = new Discord.MessageEmbed()
.setColor("#0099ff")
.setTimestamp()
.addField("Action: ", "Kick โ
")
.addField("User: ", `${user.tag} (${user.id})`)
.addField("Moderator/Admin: ", `${msg.author.tag}`)
.addField("Reason: ", ReasonForKick)
msg.channel.send(KickEmbend) ```
That is the code block.
make sure you save your code before running it
okay, well the error you gave and the code you gave say two diffrent things
how can i make the bot allow its mention as a prefix, along with a function?
also, how can i check a message to compare it to something python
so bascially a shivaco only question
ok so me want prefix to be a function{var} OR mention
so prefix can be: prefix or <!bot id>
and also, like on message, check to see if message = bot mention
holy shit so just say check for a (custom) prefix or a mention don't complicate your question thinking you sound smart
holy shit so just say check for a (custom) prefix or a mention don't complicate your question thinking you sound smart
@earnest phoenix ok my bad
thats what i meant
but the prefix is a function
wdym
p = get_prefix()
if messagePrefix == p or messagePrefix == "whatever":
# code
this is just pseudo giving you a directive
so p = the response for the function
but i dont get if messagePrefix == p or messagePrefix == "whatever":
you can create a function that does the entire prefix check
you can create a function that does the entire prefix check
@quartz kindle yeeee
how do i add a space to a prefic
prefix(
in discord py
so like for example: pp help
instead of pphelp
?
"pp "
you guys are obsessed with pp
discord filters out spaces at the end
you need to encase the prefix in quotation marks, or whatever you'd like, to include spaces
that is if your argument for the prefix is the last one
okay so i may have kinda asked this before but which areas is postgres good at and which areas is mongo good at?
if that makes sense
@grizzled raven look up "relational vs non relational database management systems"
lol
๐คทโโ๏ธ well i tried
y tho

yeah its changeit, pretty sure its a legit site
hi
I NEED CULT BETTER
@magic dome can you stop
Why i need 100 members so i can make a bible
thanks speedster
ok
I'm sorry guys, pls ask my question.. what bot can do like this? reaction for new voicechannel gaming. anyone know what bot can make like this?
Hey guys,
Does anyone one have an idea for a simple warn command + counting the warns the member got?
I was searching for ways to do it and i couldnt find one
youll need to store that info in a database @balmy anchor which if you dont have one already for your bot wont be simple
i mean databases are simple, but will take some work to get one setup.
Yeah I was thinking about it but I don't have a database for my bot :(
they are not that hard tbh, just takes some time to learn
like .sql and these?
i'd recommend mongodb/mongoose for beginners because the set up is ridiculously easy.
yeah, it depends since they are different db paradigms
sqlite is easy to use and doesnt require an online service nor a database server
Ok I'll try to find what is easier to me,
Thanks ๐
sqlite is easy to use and doesnt require an online service nor a database server
@quartz kindle Oh ok thx ๐
?
lol
lmao sorry, we trollin
I can see lol haha ๐
sqlite will require you to learn the SQL language tho, but its not very hard
As opposed to BSON

it leads me to a seizure inducing webpage
so ig its fine
WOW
the webpage for topgg is awsome
uhm what
how did u get partnered at 2k members?
how did u get partnered at 2k members?
@drifting wedge did you just apply?
for some reason, server.roles is not working in discord.py
i defined server as message.guild in the on_message event
@placid iron a long time ago, you talked to me about rounded boxes for rank cards, wuts that stack overflow
i found one, but coulnt make sense of it
you have the link for the one u were talking abot?
def rounded_rectangle(draw, xy, corner_radius, fill=None, outline=None):
upper_left_point = xy[0]
bottom_right_point = xy[1]
draw.rectangle(
[(upper_left_point[0], upper_left_point[1] + corner_radius),
(bottom_right_point[0], bottom_right_point[1] - corner_radius)],
fill=fill,
outline=outline)
draw.rectangle(
[(upper_left_point[0] + corner_radius, upper_left_point[1]),
(bottom_right_point[0] - corner_radius, bottom_right_point[1])],
fill=fill,
outline=outline)
draw.pieslice([upper_left_point, (upper_left_point[0] + corner_radius * 2, upper_left_point[1] + corner_radius * 2)],
180,
270,
fill=fill,
outline=outline)
draw.pieslice([(bottom_right_point[0] - corner_radius * 2, bottom_right_point[1] - corner_radius * 2), bottom_right_point],
0,
90,
fill=fill,
outline=outline)
draw.pieslice([(upper_left_point[0], bottom_right_point[1] - corner_radius * 2), (upper_left_point[0] + corner_radius * 2, bottom_right_point[1])],
90,
180,
fill=fill,
outline=outline)
draw.pieslice([(bottom_right_point[0] - corner_radius * 2, upper_left_point[1]), (bottom_right_point[0], upper_left_point[1] + corner_radius * 2)],
270,
360,
fill=fill,
outline=outline)```
let me guess, Rouded_rectangles are for what square circles?
oh rounded rectangles, make sense, thanks
//Reminder Function
async function remindUser(bot, data) {
try {
console.log(data);
let reminderEmbed = new discord.MessageEmbed()
.setTitle(data.messageLink)
.setDescription("You asked me to remind you at this time..")
.setColor("#FF0000");
await data.user.send(reminderEmbed)
data.remove();
} catch (err) {
console.log(err);
}}
nodeSchedule: async function scheduler(bot) {
try {
(await messageReminderModel.find({})).forEach(data => {
let currentUnix = Date.now()
if(data.time <= currentUnix) remindUser(data)
schedule.scheduleJob(data.time, remindUser(data));
console.log("Scheduled a reminder.");
});
} catch (err) {
console.log(err);
}
}
}```
im trying to use mongodb to pull reminders
would anyone mind taking a look at it?
im having trouble getting the data from the bottom function to the top one
@green kestrel needdev them
@heady heron aye this is a development channel and we got no place for advertizers
also i developed some really cool bingo cards
Show
Whats that
bingo cards
What are they used for
BINGO
playing bingo
Uh
in my server
Oh okay
i played with xiuh a while back
@gritty bolt heres an idea that might work
declare the shit outside of the functions and set it inside
or combine them
why not just combine the 2?
its a node schedule function for one
or am i dum
yea i am
so am I
what do you need to get over there
and i notice that bot would actually be your data
remindUser(bot, data)
remindUser(data)
what does "data" look like
{
_id: 5f84d8950f7d8a2994a0ffae,
user: '@gritty bolt',
time: '1602541777390',
__v: 0
}```
theres no .send in data.user
oh wait should I be doing data.id.send?
How do i give a user a role if i have the id?
i tried using the example in the docs, it didnt work
data._id?






You called me? I am free.
