#development

1 messages ยท Page 1317 of 1

opal plank
#

its highly unethical to be logging on a bot account dawg

earnest phoenix
#
<Drive>:/Users/<Your Username>/appdata/roaming/.minecraft/saves/<Your World>

because some people dunno wtf is appdata

opal plank
#

%appdata%

#

300iq

earnest phoenix
#

code

slender thistle
#

Win + R -> %appdata%

opal plank
#

^^^^^^^^

vernal rivet
#

thats just a myth dogekek 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||

sudden tulip
#

%appdata%/.minecraft/saves/<your world>

earnest phoenix
#

Ah yes, the daily cancerous development

sudden tulip
#

yes

vernal rivet
#

very

opal plank
#

you mean hourly?

sudden tulip
#

but real talk

#

i wanna change it to require my id

#

still cant figure it out

opal plank
#

to do what now?

sudden tulip
#

this channel has been shitposting for a few hrs

slender thistle
#

Didn't I tell you

vernal rivet
sudden tulip
#

Did you

#

it mustof got lost

slender thistle
#

I did

earnest phoenix
#

Shiv you didn't say anything bruv

#

is someone know how to add animated emoji to bot message?

opal plank
#

we told you

earnest phoenix
#

Use it's identifier

opal plank
earnest phoenix
#

bcz <:emojiname:id> doesnt work

vernal rivet
#

shiv is here to ||ban me for the joke|| educate us in something

sudden tulip
#

TLDR; Lost access to bot acct, wanna switch my code to edit my db to my user id

opal plank
#

it does

sudden tulip
#

their are 2 convos going @ once

opal plank
#

here, lemme get an example

sudden tulip
solemn leaf
#

guys

#

selfbots

#

work the same way

#

bots work

opal plank
solemn leaf
#

wtf

earnest phoenix
#

bot send that

#

not emoji

#
fs.existsSync(path).catch();
TypeError: fs.existsSync(...).catch is not a function

but that's a catch block?

solemn leaf
sudden tulip
#

did i just see an invite?

opal plank
sudden tulip
#

for like 2 seconds

earnest phoenix
#

@earnest phoenix That's sync

opal plank
#

click that link @earnest phoenix

earnest phoenix
#

it doesnt work for me

#

i dont have eval btw

#

catch can't be used on something that is not a promise

opal plank
#

cuz ur bot doesnt have access to the emoji then

earnest phoenix
#

from my server

#

where is the bot?

opal plank
#

the bot must be in a guild where the emoji is on

earnest phoenix
#

but fs.existsSync throws an error when it can't find the thing

#

erwin

opal plank
#

yes?

earnest phoenix
#

existsSync => exists

stuck geyser
#

hi

earnest phoenix
#

or the a animated emojis doesnt work

#

w h a t

opal plank
#

it does, just append a: to it

earnest phoenix
#

for this

opal plank
earnest phoenix
#

ok

opal plank
#

same deal, look

earnest phoenix
#

:ASKyokoDance:

#

brrrrrrrrrrrrrrrrrrrrrrr

#

doesnt work

midnight quarry
#

can someone help me pls dm me

opal plank
earnest phoenix
#

Ask your question here

sudden tulip
opal plank
#

it does, the bot just doesnt have that emoji in cache

sudden tulip
#

Its that simple

#

๐Ÿ˜

slender thistle
#

mhm

sudden tulip
#

bruh

#

alr

opal plank
#

the emoji is on a server my bot isnt in(YET)

sudden tulip
#

1 sec

midnight quarry
#

@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

earnest phoenix
#

By making code?

midnight quarry
#

how

opal plank
#

imma slap them with the guide, one second

earnest phoenix
#

What library are you gonna make code with

opal plank
#

read that

midnight quarry
#

i read

opal plank
#

good, read all

earnest phoenix
#

is that simple past tense or simple present tense

opal plank
snow elbow
#

h

opal plank
#

what is this? dotposting?

drifting wedge
#

how do i like check what source lavalink is playing from?

#

python

spiral crag
#

anybody know how to make bot send messages without commands in discord.py

#

please help

earnest phoenix
#

๐Ÿฅฒ

slender thistle
#

What do you mean "without commands"

spiral crag
#

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

solemn latch
#

Sounds like potentially collecting presence like data
Not sure discord would approve of that type of data collection

spiral crag
#

this is just an example

earnest phoenix
#

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

drifting wedge
#

@spiral crag u made server nuke bot wtw this discord tos against ok
@earnest phoenix depneds

#

if its for ur server

#

its fine ig

spiral crag
#

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

solemn latch
#

Not a py dev, but can't you just use a global variable with the channel you want to send the data to?

earnest phoenix
#

if i do fs.writeFileSync("yeet/lol/owo"); and the folders inside yeet aren't already there will fs create them automatically?

spiral crag
#

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

earnest phoenix
#

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

spiral crag
#

how do you do that

earnest phoenix
#

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

solemn latch
#

@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.

earnest phoenix
#

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

sudden tulip
#

i dont see where the inconsistant spaces are

solemn latch
#

Tabs vs spaces

earnest phoenix
#

@sudden tulip is that Notepad++ notlikenoot

sudden tulip
#

NP++ gang

solemn latch
#

LoL

sudden tulip
#

i dont see where it's wrong tho

earnest phoenix
#

Notepad++ is a smol text editor it's NOT meant to be used as an IDE

sudden tulip
#

uuuuuuuuhgh

#

lemme install vsc

earnest phoenix
#

yeah

sudden tulip
#

wait

earnest phoenix
#

please

sudden tulip
#

i have vs

#

nvm

earnest phoenix
#

if i do fs.writeFileSync("yeet/lol/owo"); and the folders inside yeet aren't already there will fs create them automatically?
just realized it doesn't

spiral crag
#

peachy are you a py dev

earnest phoenix
#

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

spiral crag
#

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

earnest phoenix
#

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

spiral crag
#

@sudden tulip can you help me please

chrome nebula
#

hey dose someone have a tut for setting up grafana for discord bot's

solemn latch
#

I dont know of any

#

Just use any grafana tutorial

spiral crag
#

is anyone a python developer here

earnest phoenix
#

please stop begging for help

sudden tulip
#

@spiral crag couldnt help u

earnest phoenix
#

you can go to stackoverflow where it's people's literal job to help

solemn latch
#

Messages have the delete option @sand dune use your bots libs docs to see how to use it

earnest phoenix
#

okay

#

now i know

#

its doesnt work on animated emoji

sudden tulip
#

it looks inline

#

wtf

solemn latch
#

Same issue?

sudden tulip
#

yep

solemn latch
#

Try format document when you right click

#

Maybe it solves those problems magically

earnest phoenix
#

I'm honestly gonna die because of fs

sudden tulip
#

HOLY SHIT

#

ffs

solemn latch
#

Did it do it

sudden tulip
#

i guess i cant do is_me

earnest phoenix
#

try using this formatter extension

sudden tulip
#

FUCK

earnest phoenix
#

it can format most languages even better than VSC's built-in formatter

sudden tulip
#

Yea! its working now

earnest phoenix
#

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||

solemn latch
#

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.

earnest phoenix
#

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 *

solemn latch
#

Then I would check every single time if they are over the amount.

earnest phoenix
#

i want to tax people in every 10k of their money 1%

solemn latch
#

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

quartz kindle
#

its fine if you make it only for you

#

its not fine if you allow other users to see it

solemn latch
#

Can't you just look at the guilds region?

earnest phoenix
#

is someone know how to make

worn shard
#

What?

#

Make what?

solemn latch
#

I know how to make

earnest phoenix
#

changing status in discord.js

solemn latch
#

Docs cover it

worn shard
solemn latch
#

Or the docs

worn shard
#

Maybe

#

I use py so idk

solemn latch
earnest phoenix
#

No results for "changing status

next flax
#
    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)```
compact oriole
#

...

worn shard
#

hmm

#

Why does everyone use js

solemn latch
#

Py is bad for bots imo

next flax
#
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)

}}```
solemn latch
#

Js isn't great either but whatever

worn shard
#

What do you use?

next flax
#

what is the issue?

solemn latch
#

Js, but mainly because I'm lazy and its easy

worn shard
#

Unknown message

#

@solemn latch Dpy is pretty easy too, ANd it comes with a defualt help command

next flax
#

but the id isnt unknown

solemn latch
#

Default help is in commando, but help commands take like half and hour to make anyway

worn shard
#

Ya

#

I use my own

earnest phoenix
#

soo

#

how to make changing status?!?!?!

solemn latch
#

You have to search through the client methods.

#

Its not google you can't just search words and find what you want

next flax
#

@earnest phoenix set interval

solemn latch
#

You can just use the guild.iconUrl or whatever the lib your on uses

#

Set interval isn't required for setting status

next flax
#

he wants

#

a status

#

that will change

#

after a period of time

solemn latch
#

he never said that

next flax
#
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)

}}```
solemn latch
#

he just said he wants to set a status

lean wing
#

someone know if digital ocean is a good host for a music bot?

solemn latch
#

it will work well

next flax
#
    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```
solemn latch
#

channel may not be defined

lean wing
#

ok beacause know i am hosting o herocu free plan and it is horible

next flax
#

wait

#

i copy pasted the thing i was testing

solemn latch
#

heroku is a pain with music bots, always has been

next flax
#

long ago

#

heroku is paid now

#

i got news

lean wing
#

yea i saw it ๐Ÿ˜‚

next flax
#
    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)
solemn latch
#

ay, finally, people will stop using it for bots maybe

lean wing
#

25 server and it every 5 min went offline

next flax
#

new error

solemn latch
#

your fetching m but not awaiting it

#

fetch is a promise

#

so your m.edit is running before m is resolved

lean wing
#

thanks woo

solemn latch
#

np

next flax
#

what should i do

#

then

solemn latch
#

await the fetch

#

or .then

#

probably await since your function is already async

next flax
solemn latch
#

yeah

#

also, your not checking if channel exists(which it may not) so the first error you get will periodically happen still.

next flax
#

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

lavish tinsel
#

Ok well Iโ€™ve brought my bot online once again

next flax
#

like color

solemn latch
#

color of?

next flax
#

embed

earnest phoenix
#

is someone know how to add how many servers bot are to status

next flax
#

just add

#

${client.guilds.cache.size}

#

@earnest phoenix

earnest phoenix
#

ok

next flax
#

to the status message

#

note use backticks

earnest phoenix
#

ye ye `

next flax
#

color of?
@solemn latch u know?

solemn latch
#

you can just use .setColor

next flax
#

but

next flax
#

if someone has to just

#

edit embed message

#

not the embed color

solemn latch
#

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

earnest phoenix
#

As a last resort, you can also delete the message and resend it

next flax
#

no

solemn latch
next flax
#

hm

#

how do i seperate args using |

past crypt
#

I need free vpn

solemn latch
#

free vpn?

#

probably a bad idea

next flax
#

@past crypt dm me i will give

#

nord accounts

#

but tomorrow

#

: (

solemn latch
#

split("|")

next flax
#

example?

#

@solemn latch

next flax
#

const text = args.slice(1).join(" ").split("|")

#

@solemn latch ?

solemn latch
#

sure

next flax
#

so if i

#

mention

ripe ibex
#

Please if any developer here has experience with Heroku and the DBL api, I would appreciate a lot if you DM me. Thanks!

next flax
#

args[2] i will have to text | args[2]

#

will this work?

solemn latch
#

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]"]

next flax
#

?

solemn latch
#

it splits it into an array

slender wagon
#

is slappey good to use?

next flax
#

this doesnt work

solemn latch
#

log your text var

next flax
#

ok

#

then

#

var text = args.slice(1).join(" ").split(' | ');?

earnest phoenix
#

Hey

#

I m new here

solemn latch
#

console.log the variable so you can see whats not working @next flax

earnest phoenix
#

Idk how to make bots ...

earnest phoenix
#

@solemn latch ok can you help me ?

solemn latch
#

i would look at faq first

next flax
#

everything is working

earnest phoenix
#

Ok @solemn latch

next flax
#

only i want to split them

solemn latch
#

so, log the variable

#

so you can see

#

what split

#

is

#

doing

peak osprey
#

also dont use var please

earnest phoenix
#

@solemn latch yes I saw

solemn latch
#

oh is that what he did, i didnt even see what he changed lmao

earnest phoenix
#

How to do coding ?

solemn latch
#

I use VSC to code

#

but you can use any IDE you like

earnest phoenix
#

@solemn latch pls say

#

I m new here

#

I have made bot

solemn latch
#

I'm not a teacher ๐Ÿคทโ€โ™‚๏ธ

dire obsidian
#

so exactly, js or typescript?

earnest phoenix
#

@solemn latch butt you're Verifed bot Developer

solemn latch
#

bot developer

#

not teacher

earnest phoenix
#

Ok

dire obsidian
#

that doen't mean that he's a teacher

earnest phoenix
#

@dire obsidian hmm ok

dire obsidian
#

well so

#

is posible make a bot in typescript?

solemn latch
#

yeah

next flax
#

@dire obsidian Yes

solemn latch
#

erwin does his stuff in typescript

dire obsidian
#

ohok

next flax
#

Woo thanks for ur help my command is working great !!

dire obsidian
#

anyways im making websites, just meeeh

#

oh my woo master in development

slender wagon
#

wait what's the difference btw mongodb and mongoose

solemn latch
#

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 KEKW

slender wagon
#

can both be used?

#

like

#

in 1 project

solemn latch
#

yeah

next flax
#

Woo thanks for ur help my command is working great !!

#

btw

solemn latch
#

np

next flax
#

and bye gn gtg

solemn latch
#

gn man

next flax
#

Yes

static wraith
#

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

solemn latch
#

```js
codehere
```

#

makes things easier to read

#

your not putting it in quotes

dire obsidian
#

thanks

solemn latch
#

``

static wraith
#

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);
    }
}
;
solemn latch
#

in your code, strings need to be in quotes

static wraith
#

so which bits

solemn latch
#

@EVERYONE ${args[+1]}

#

you put `` around it to highlight it here

static wraith
#

I have put the quotes around it

solemn latch
#

still red?

static wraith
#

Around the args ?

#

yeah

solemn latch
#

around the string

static wraith
#

Sorry im kinda new and i wing it through most of it

#

whats teh string ๐Ÿคฃ

#

i know i should learn all of it

solemn latch
#

text is a string

#

"hi mom, how are you"

#

is a string

static wraith
#

yeah it is in quotations

solemn latch
#

"@EVERYONE ${args[+1]}"

#

is a string

static wraith
#

its in the box

#

i need the slanted ones

#

so the args comes as a code

#

and not just text

solemn latch
#

yeah, did you do that?

static wraith
#

yeah

earnest phoenix
#

Why do i get 0 with const Amount = client.guilds.size.cache?

static wraith
#

Its the message and return

#

thats whats red lined

solemn latch
#

you did it backwards @earnest phoenix

#

guilds.cache.size

#

this is why posting code in discord is a problem KEKW

earnest phoenix
#

Still 0

solemn latch
#

you said whats highlighted, but discord highlights random parts of code

static wraith
#

There thats easier to look at

solemn latch
#

if (condition)

static wraith
#

aye that worked

#

cheers bud

#

you should really be a mod

#

all i do is see you helping people

solemn latch
#

id deny it if it was offered

static wraith
#

why tho

solemn latch
#

reviewing bots sounds annoying KEKW

static wraith
#

lmao KEKW

quartz kindle
#

mods are not here to help people with development, they are here to review bot applications xd

solemn latch
#

^

#

I dont need a role to be helpful

static wraith
#

Hmmmm i guess where they should add another role like certified helper or something

#

idk just something to show

#

you know your shit

solemn latch
#

id take perms to use luca commands

#

no banning/muting or anything tho, i do enough of that already

quartz kindle
#

i wish i'd get a dollar every time i helped someone

#

lmao

static wraith
#

im not even gonna ask KEKW

prisma oriole
#

yes time to get $1 everytime i tell some to do npm install python

static wraith
#

eeeee

#

java script

solemn latch
#

that would be a sick way to make money though

#

just sit here helping people with issues

#

ez job

static wraith
#

i cant do python

#

it hurts my eyes

#

too complicated

prisma oriole
#

wait a minute...

solemn latch
#

python confuses me too. I am learning slowly by being in here

static wraith
#

for someone who just wings it lmao

compact oriole
#

the thing with py is that it's master of nothing, even tho it's ez

prisma oriole
#

isnt python meant to b e easy

solemn latch
#

yeah

compact oriole
#

the syntax also isn't for everyone (like me)

solemn latch
#

^

compact oriole
#

I luv my ; and {

prisma oriole
#

the whole indeted parsing is just

#

asdkal;sdk;lasd

solemn latch
#

syntax is easy to learn if you dont know standard syntax

static wraith
#

I just try it error fix it try it error fix it then magically it works

earnest phoenix
#

where can you find tio api

solemn latch
quartz kindle
#

tio api?

static wraith
#

Is they are "or" command?

earnest phoenix
#

try it online

static wraith
#

Like .hasPermmisions("ADMINISTRATOR" or " ")

solemn latch
#

sounds like dong(do online now guys)

slender thistle
#

hasPermission(X) || hasPermission(Y)

earnest phoenix
slender thistle
#

or wait

#

Doesn't hasPermission accept an array?

static wraith
#

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

solemn latch
#

do you mean like, an admin without also having manage_messages?

quartz kindle
vernal rivet
#

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.

static wraith
#

apparently

if (message.author.hasPermissions(" "))

Isnt a command???

vernal rivet
#

shouldn't be a command, god i hope not

solemn latch
#

author isnt a member

static wraith
#

i mean

solemn latch
#

only members have permissions

static wraith
#

function

vernal rivet
#

but you have to use the member property instead of author

#

author is typeof User

#

not associated with the guild

static wraith
#

So what would it be then

vernal rivet
#

member property

earnest phoenix
#

I need a good js dev to help me

static wraith
#

Because its not message.member

vernal rivet
#

message.member

#

it should be

static wraith
#

it dsnt work

#

im getting not a function

vernal rivet
#

what did you put in?

#

message.member.hasPermissions()

#

whats up @earnest phoenix

static wraith
#
 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())
vernal rivet
#

kellyded god i hate the code block in discord sometimes

solemn latch
#

iirc, member doesnt have hasPermissions

#

yeah

vernal rivet
#

wait actually?

solemn latch
#

hastebin op

#

hasPermission, no hasPermissions

#

you can check multiple perms with hasPermission tho

vernal rivet
#

so hasPermission is overloaded?

#

oh i was thinking of using the permission property dogekek 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.

static wraith
#

i knwo im asking alot of questions but how do i make it to include everything after the 1st artgument

vernal rivet
#

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 dogekek 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

solemn latch
#

Lmao

static wraith
#

so what would it be again sorry

#

so would the args.join be inside the string

#

or

solemn latch
#

Args.slice(1).join(" ") or something

vernal rivet
#

what i sent before my small brain was being exposed

#

milk_think why would you slice. you are just removing an item i believe. it's just args.join(" ")

static wraith
#

in the string ?

solemn latch
#

He asked for the first arg removed

#

Everything after first

vernal rivet
#

oh then use shift()

static wraith
#

so its gonna be like

solemn latch
#

Shift and slice work the exact same way here

static wraith
#

.announce <text body>

vernal rivet
#

wait shit, shift returns the items dogekek

static wraith
#

ao i juat want it to take

#

<text body>

vernal rivet
#

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

solemn latch
#

Rip storage

static wraith
#

so after all this

#

what would it be MegaThonk

solemn latch
#

Just args.slice(1).join(" ") will work

vernal rivet
#

^^^

solemn latch
#

Since its what most people use

#

I'm in the middle of making pancakes so I'm only half watching the convo

vernal rivet
#

dogekek 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.

static wraith
#

Thankyou boys

vernal rivet
#

np

solemn latch
#

Lmao

#

Thats rude

slender thistle
#

np

fervent goblet
#

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?

solemn latch
#

Store it in a database

fervent goblet
#

Thats a lot of data to store tho

solemn latch
#

Is it?

fervent goblet
#

yes

solemn latch
#

Its just urls.

fervent goblet
#

no

#

its songs info and requested and all of that

solemn latch
#

Why do you need to store all that?

#

That info can be gotten again from the url

fervent goblet
#

yes but i use lavalink which automatically has a info portion in the object

solemn latch
#

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

slender wagon
#

how tf do i setup mongodb?

fervent goblet
#

download the community server

slender wagon
#

just did

faint prism
#

or use atlas

slender wagon
earnest phoenix
#

what exactly does sending data in the request body through POST requests mean

#

or just do alt f4

solemn latch
#

Alt f4 is my preferred dev solution

slender wagon
#

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

earnest phoenix
#

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

slender wagon
#

where do u see trolling allowed

earnest phoenix
#

where do u see trolling allowed
@slender wagon here, but to a certain extent

solemn latch
#

Its mainly dont troll endlessly.
A joke or two isn't a problem.

earnest phoenix
#

ok sry sry ima stop playin

#

it's fine

slender wagon
#

so back in the topic

earnest phoenix
#

ok

slender wagon
#

how do i get started with this thing

earnest phoenix
#

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

faint prism
#

what exactly does sending data in the request body through POST requests mean
@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)

drifting wedge
#

any python devs here? d.py python devs?

faint prism
#

just ask the question

drifting wedge
#

just ask the question
@faint prism thats it?

solemn latch
#

"Any Java experts around?"

drifting wedge
#

python devs, identify yourselves

#

"Any Java experts around?"
@solemn latch yes, literally

faint prism
#

Shiv does a bit iirc

drifting wedge
#

Shiv does a bit iirc
@faint prism a LOT not a bit

solemn latch
faint prism
#

heheheh

drifting wedge
#

no like my question is literally: who here is a python dev

#

thats it, not asking for help or have another question

solemn latch
#

theres around 10 or so python devs im aware of that visit this channel sometimes

drifting wedge
#

theres around 10 or so python devs im aware of that visit this channel sometimes
@solemn latch lol

solemn latch
#

most show up for a day, then never come back

drifting wedge
#

10/1000000

#

lol

#

10 ppl in total

#

lmao

solemn latch
#

well, most bot devs dont use this channel

#

ive only seen maybe 50-100 people in this channel for more than one conversation

drifting wedge
#

F

solemn latch
#

I feel like you can make api requests to top.gg to see what libs bot are using

drifting wedge
#

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!

solemn latch
#

-nodev

drifting wedge
#

-nodev
@solemn latch yep

#

i already know the tag

#

dont even get a mod to do it lmao

solemn latch
#

its not even -nodev
its something else i cant remember

drifting wedge
#

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

solemn latch
#

MODS DO IT HE NEEDS IT KEKW

drifting wedge
#

tho where can i go to find ppl to do stuff for free with no pay whatever working in non-approved working conditions

solemn latch
#

Generally, you cant

#

if you have an open source project, say your looking for other devs. the devs who want to contribute will

drifting wedge
#

alr

#

gracias

solemn latch
#

the only projects ive contributed to have been unique in one way or another.

visual dawn
#

dd

#

d

#

d

restive furnace
#

tho where can i go to find ppl to do stuff for free with no pay whatever working in non-approved working conditions
hello? ToasterQuestionMark You called me? I am free.

quartz kindle
#

lmao

solemn latch
#

dinner tomorrow night? @restive furnace

#

your free, i know it

faint prism
#

Only if it leads to developing code โœ๏ธ

restive furnace
#

dinner tomorrow night? @restive furnace
@solemn latch sure

solemn latch
#

oh something will be developed @faint prism

#

a friendship that never ends

restive furnace
#

Cool

fervent goblet
#

what version of java is required to run lavalink?

solemn latch
#

"Java 11* LTS or greater required."

#

it suggest using java 13

#

14 has issues, 11 has issues, sometimes they work, sometimes they dont

restive furnace
#

lol

#

my vps is outdated then i think

#

it has openjdk 8

solemn latch
#

openjdk uses diffrent version numbers right?

uncut river
#

anyone know how to manage bot ram usage like make it "reset" without restarting the bot

solemn latch
#

ram usage increases as the things cached increases

uncut river
#

but after restarts its okay

solemn latch
#

some libs allow more control over whats cached and whats not

uncut river
#

how can i refresh in a way

#

discord.js

solemn latch
#

discordjs doesnt give a lot of control over caches

uncut river
#

ah okay

restive furnace
#

openjdk uses diffrent version numbers right?
not sure

solemn latch
#

theres a few things iirc you can do

uncut river
#

so theres not much i can do but restart my bot every 24 hours to prevent too much ram?

solemn latch
#

you can swap to discordjs-lite

#

which gives more cache control

uncut river
#

would i have to change any code? like does it follow updates

restive furnace
#

not sure
@restive furnace yep nope, 8 = 8, 13 = 13 and so on.

solemn latch
#

hmm

#

intresting

#

tim trys to keep them as close as possible afaik, but some things will be diffrent @uncut river

misty sigil
#

discord.js-light

#

pog

uncut river
#

thanks for letting me know!

slender wagon
#
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
solemn latch
#

const GuildConfig = require( '../database/schemas/GuildConfig.js' );
const GuildConfig = await GuildConfig.create

slender wagon
#

oh

#

thank you i'll give it a try now

#

smh it was just a capital letter

#

that was giving the error

earnest phoenix
#

hi is someone know why a eval doesnt work?

#

its doesnt sending

#

anything

blissful coral
#

Canโ€™t help you without code

oak cliff
#

-moreinfo

gilded plankBOT
#

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.

earnest phoenix
#

How do i get server icon in gif

#

In js

solemn latch
#

you want the icon, or the icon url?

earnest phoenix
#

When i do guild.iconURL

uncut river
#

format dynamic

#

as on object

uncut river
#

iconURL({format:"dynamic"})

earnest phoenix
#

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 }

uncut river
#

oh my bad

#

dynamic

#

i meant

#

i got it half right

slender wagon
#
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

misty sigil
solemn latch
#

findOne is returning null

ionic dawn
#

halp me

#

So Woo, can I explain you that thing what I told you yesterday?

solemn latch
#

yeah sure

earnest phoenix
#

how to make @botname?

solemn latch
#

^ covers making bots

ionic dawn
#

So... im trying to make a command that generates this AmongUsPet, using the users pfp or "attach files"

#

and my knowledges of canvas or gif encoder are poop

solemn latch
#

do you have the hand asset separated somewhere?

ionic dawn
#

the sprites?

solemn latch
#

ye

ionic dawn
#

yep

solemn latch
#

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

ionic dawn
#

the problm... is that I have no idea how to do that

solemn latch
#

I would start with just canvas then, do the gif stuff second

ionic dawn
#

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

solemn latch
#

potentially your doing more frames than the hand gif has.

#

so just doing one less frame should do it.

ionic dawn
#

k ill try

solemn latch
#

the gif you showed had 5 frames

ionic dawn
#

dnt look at the formats Yeet

earnest phoenix
gritty bolt
#

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```
sudden geyser
#

You're unnecessarily awaiting some expressions in your code.

gritty bolt
#

okay

#

but what im pretty sure is happening is my msTime isn't waiting for the first function to finish

sudden geyser
#

Your error likely comes from this line: let msTime = ms(global.collectedTime)

gritty bolt
#

and idk how to make it wait

#

it did

sudden geyser
#

Where did you assign collectedTime to global in your source code.

gritty bolt
#

thats it

#

my stupid self made a spelling error

sudden geyser
#

I wouldn't recommend assigning any property to global unless you really need it to live throughout your program's lifespan.

gritty bolt
#

same erorr

#

still getting it

opal sun
#

Hey how Can i say to mโ€™y bot to join a Channel where i am wath an script and to do some music

solemn latch
#

you just say "hey bot, join a channel and do musics for me and the boys"

gritty bolt
#

can someone please help me fix this

earnest phoenix
#

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 WeSmart

#

@gritty bolt i mean the error tells you what the issue is

gritty bolt
#

i dont get how to define it tho

earnest phoenix
#

whatever you're passing to ms() is undefined

gritty bolt
#

why is it coming out as undefined

#

im putting the message content i collect into it

earnest phoenix
#

that's running right after you call on

#

on() isn't a promise, it won't block, there's no need to await it

gritty bolt
#

how do I not do that

earnest phoenix
#

it's an event for a reason

gritty bolt
#

i want to wait

earnest phoenix
#

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

gritty bolt
#

yea im removing them

#

i thought it'd help

#

it didnt

earnest phoenix
#

How would i give a role to a user if i have the id of the role?

solemn latch
#

docs would explain it

earnest phoenix
#

i cant find it in docs

solemn latch
#

if i find it instantly not being a py dev ima be mad at chu KEKW

earnest phoenix
#

is vue better than react?

#

oh found it

livid lichen
#
             ^

TypeError: Cannot read property 'channel' of undefined ``` Um, what?
solemn latch
#

what is that code

#

msg.send.channel.send(KickEmbend)

#

why do you send twice

livid lichen
#

?

#
  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.

solemn latch
#

make sure you save your code before running it

livid lichen
#

Uh- I did.

#

I always do.

solemn latch
#

okay, well the error you gave and the code you gave say two diffrent things

livid lichen
#

Alright?

#

Uh, It just worked. Thanks for the help!

#

I appreciate it.

drifting wedge
#

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

earnest phoenix
#

what and what

#

neither of those questions made sense

drifting wedge
#

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

earnest phoenix
#

holy shit so just say check for a (custom) prefix or a mention don't complicate your question thinking you sound smart

drifting wedge
#

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

earnest phoenix
#

call it before your if

#

get the result

drifting wedge
#

wdym

earnest phoenix
#
p = get_prefix()
if messagePrefix == p or messagePrefix == "whatever":
  # code
#

this is just pseudo giving you a directive

drifting wedge
#

so p = the response for the function

#

but i dont get if messagePrefix == p or messagePrefix == "whatever":

quartz kindle
#

you can create a function that does the entire prefix check

drifting wedge
#

you can create a function that does the entire prefix check
@quartz kindle yeeee

random mantle
#

How can invite DSL ??

#

pls help mw

solemn latch
drifting wedge
#

how do i add a space to a prefic

#

prefix(

#

in discord py

#

so like for example: pp help

#

instead of pphelp

#

?

unique nimbus
#

when you set your prefix as pp

#

change it too pp

boreal iron
#

"pp "

faint prism
drifting wedge
#

Lmao

#

Ty

solemn latch
#

you guys are obsessed with pp

drifting wedge
#

Pp is just an example

#

Mine will the bot mention

earnest phoenix
#

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

grizzled raven
#

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

solemn latch
faint prism
#

@grizzled raven look up "relational vs non relational database management systems"

solemn latch
#

@split hazel

#

i need someone fast

#

speedie

magic dome
#

lol

solemn latch
#

๐Ÿคทโ€โ™‚๏ธ well i tried

faint prism
#

y tho

magic dome
faint prism
solemn latch
#

yeah its changeit, pretty sure its a legit site

split hazel
#

hi

solemn latch
#

just shouldnt be in here

#

speedie fast

magic dome
#

I NEED CULT BETTER

split hazel
#

@magic dome can you stop

magic dome
#

Why i need 100 members so i can make a bible

split hazel
#

i dont care

#

stop

solemn latch
#

thanks speedster

magic dome
#

ok

grim ridge
#

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?

balmy anchor
#

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

solemn latch
#

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.

balmy anchor
#

Yeah I was thinking about it but I don't have a database for my bot :(

solemn latch
#

they are not that hard tbh, just takes some time to learn

balmy anchor
#

like .sql and these?

prisma oriole
#

i'd recommend mongodb/mongoose for beginners because the set up is ridiculously easy.

solemn latch
#

I like sql, some reccomend ^ that

#

sql i find easier than mongo

prisma oriole
#

yeah, it depends since they are different db paradigms

quartz kindle
#

sqlite is easy to use and doesnt require an online service nor a database server

balmy anchor
#

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

quartz kindle
#

lmao sorry, we trollin

balmy anchor
#

I can see lol haha ๐Ÿ˜„

quartz kindle
#

sqlite will require you to learn the SQL language tho, but its not very hard

faint prism
#

As opposed to BSON

drifting wedge
#

@spare goblet mimu website down

#

just letting ya know

spare goblet
drifting wedge
spare goblet
#

๐Ÿ‘๏ธ

drifting wedge
#

1 sec

#

nop

#

doesnt work

spare goblet
#

odd

drifting wedge
#

sorry for the ping btw

#

yea

spare goblet
#

not sure whats causing it

#

its redirecting fine for me

drifting wedge
#

it leads me to a seizure inducing webpage

#

so ig its fine

#

WOW

#

the webpage for topgg is awsome

spare goblet
#

uhm what

drifting wedge
#

how did u get partnered at 2k members?

#

how did u get partnered at 2k members?
@drifting wedge did you just apply?

spare goblet
#

what

#

are you taling to me

drifting wedge
#

?

#

tailing me?

spare goblet
#

this isnt related to bot development btw

#

talking *

earnest phoenix
#

for some reason, server.roles is not working in discord.py

#

i defined server as message.guild in the on_message event

drifting wedge
#

@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?

placid iron
#
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)```
drifting wedge
#

let me guess, Rouded_rectangles are for what square circles?

#

oh rounded rectangles, make sense, thanks

gritty bolt
#
//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

misty sigil
#

@green kestrel needdev them

slender wagon
#

@heady heron aye this is a development channel and we got no place for advertizers

misty sigil
#

also i developed some really cool bingo cards

slender wagon
#

Show

gritty bolt
#

i developed broken code

#

๐Ÿ™‚

slender wagon
#

Whats that

misty sigil
#

bingo cards

slender wagon
#

What are they used for

solemn latch
#

BINGO

misty sigil
#

playing bingo

slender wagon
#

Uh

misty sigil
#

in my server

slender wagon
#

Oh okay

gritty bolt
#

ok can someone like please help me

misty sigil
#

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

gritty bolt
#

but its data im pulling from my db

#

from a .find()

misty sigil
#

why not just combine the 2?

gritty bolt
#

its a node schedule function for one

misty sigil
#

or am i dum

gritty bolt
#

like im using node schedule

#

to schedule the other function

misty sigil
#

yea i am

gritty bolt
#

so am I

misty sigil
#

what do you need to get over there

#

and i notice that bot would actually be your data

gritty bolt
#

each data object from that

#

wait what

#

it is

misty sigil
#

because bot is the first defined

#

and data is the first passed

gritty bolt
#

oh

#

well uh

#

thats not helping

#

i am now getting data.user.send is not a function

solemn latch
#

remindUser(bot, data)
remindUser(data)

gritty bolt
#

changed that

#
await data.user.send(reminderEmbed)```
it says this isnt a function
solemn latch
#

what does "data" look like

gritty bolt
#
{
  _id: 5f84d8950f7d8a2994a0ffae,
  user: '@gritty bolt',
  time: '1602541777390',
  __v: 0
}```
solemn latch
#

theres no .send in data.user

gritty bolt
#

oh wait should I be doing data.id.send?

earnest phoenix
#

How do i give a user a role if i have the id?
i tried using the example in the docs, it didnt work

solemn latch
gritty bolt
#

data._id?