#development

1 messages · Page 628 of 1

grave pilot
#

Thanks

rotund creek
#

is there a bot that monitors your uptime and displays it as a percentage?

steel heath
dusky marsh
#

hm, my code for 11.4.2 works with <message>.member.voiceChannel so I assumed it wasnt changed, maybe it was tho ¯_(ツ)_/¯

earnest phoenix
#

hey

warm marsh
#

@rotund creek Monitors a user? aka you?

rotund creek
#

yeah

warm marsh
#

Em, This isn't the chat for asking that #memes-and-media but you could just code one.

rotund creek
#

someone told me to post here I didn't realise it was dev tho

#

so I just clicked on it and pasted

earnest phoenix
#

Can someone tell me how I select .json in discord.js and what can write in for example a user profile with birthday banner and favorite color and description ...?

#

use fs

#

its a npm package

#

I know

#

but how do I use it?

#

You have searched on google before asking here?

#

Yes

#

Did not find anything that worked for me

#

For select something in a json file ```
const json1 = require('../test.json')

json1[data].data
or
json1[data]

#

Ok

#

its very easy

#

But im to stupdit for it xD

#

Ok...

#

Thx

#

Np

lofty hamlet
#
        anothermessage.react('🌲')

        const filter = (reaction, user) => {
            return ['🌲'].includes(reaction.emoji.name) && user.id === message.author.id;
        };

        anothermessage.awaitReactions(filter, { max: 1, time: 10000, errors: ['time'] })
            .then(collected => {
                const reaction = collected.first();

                if (reaction.emoji.name === '🌲') {
                    if (db.get(`userInfo_${message.author.id}.bucheron`) < 10) {
                        drop = "Chêne"
                    }
                    
                    reaction.remove()
                    arbrecut += 1
                }
            })
    })```
#

Hi how i can remove the reaction of user and not bot :

#

reaction.remove() remove the reaction of the bot and not the reaction of the user :/

earnest phoenix
#

reaction.remove(message.author.id)

#

Idk if its working mmLol

#

But you can try

lofty hamlet
#

I love u

#

Thx

earnest phoenix
#

Its working? @lofty hamlet

lofty hamlet
#

Yes

#

Thx

earnest phoenix
#

Np

lofty hamlet
#

But this i can't reclick in the reaction

#

I think is it an awaitreaction

#

He work just one time

#

I want than the user can re click in the reaction

earnest phoenix
#

Remplace 1 by 2 in max:

#

I think is that

lofty hamlet
#

Oh ok and how i can make unlimited ?

earnest phoenix
#

max: 0 i think

#

Or put 999

lofty hamlet
#

Not work

#

When i set 0 and çç

#

999*

earnest phoenix
#

Whats happening when you put 0 or 999

lofty hamlet
#

Nothing

#

When i click in the reaction nothing

earnest phoenix
#

Remove max: 1,

lofty hamlet
#

Not work

#

I thinks because this is a awaiting reaction

earnest phoenix
#

Yeah

lofty hamlet
#

I go eat i come again if you have a response ping me plz

earnest phoenix
#

okay

#

bonne app @lofty hamlet

lofty hamlet
#

Thx

earnest phoenix
#

Np

late hill
#

Additional reactions won't do anything because const reaction = collected.first();

#

You're using the first one either way

earnest phoenix
#

Ah yeah

late hill
#

Code logic doesn't make much sense

#

If you'd want just the first, you should just use max: 1, no reason to have collected.first()

#

Your filter checks the emoji name and inside the event you check it again

#

You're using an array with just 1 element

earnest phoenix
#

@lofty hamlet ^

late hill
#

Also a possible issue why your second reaction wouldn't work is the time limit you've set.

#

Make sure you didn't pass it

lofty hamlet
#

I'm back

earnest phoenix
#

Yeah its in ms

#

@lofty hamlet look above

lofty hamlet
#

Yeah

#

No the time change nothing

#

@late hill

earnest phoenix
#

If the time are passed, you cant put an another reaction

lofty hamlet
#

No the time change nothing i say 😉

late hill
#

What's your current code

lofty hamlet
#

You want all of my code ?

#
    arbrecut = 0
    let embed = new Discord.RichEmbed()
        .addField(`Amélioration métier de Bûcheron`, `Dernier arbre coupé : ${drop} (Bois de cet arbre obtenu)\nArbre(s) coupé(s) durant cette session : ${arbrecut}\nNiveau actuel du métier : ${db.get(`userInfo_${message.author.id}.bucheron`)}\nXP actuel du métier : ${db.get(`userInfo_${message.author.id}.bucheronxp`)}`)
        .setColor("RANDOM")
    message.channel.send(embed).then(anothermessage => {
        anothermessage.react('🌲')

        const filter = (reaction, user) => {
            return ['🌲'].includes(reaction.emoji.name) && user.id === message.author.id;
        };

        anothermessage.awaitReactions(filter, { max: 1, time: 10000, errors: ['time'] })
            .then(collected => {
                const reaction = collected.first();

                if (reaction.emoji.name === '🌲') {
                    if (db.get(`userInfo_${message.author.id}.bucheron`) < 10) {
                        drop = "Chêne"
                    }
                    
                    reaction.remove(message.author.id)
                    arbrecut += 1
                }
            })
    })```
late hill
#

And what are you trying to achieve

earnest phoenix
#

@lofty hamlet random color working?

lofty hamlet
#

@earnest phoenix of course

#

@late hill i want when i click in the reaction, the reaction is withdrawn and i can reclick for make the same loop

late hill
#

Should still change your filter to
reaction.emoji.name === '🌲' && user.id === message.author.id as mentioned before

#

No reason to use an array

earnest phoenix
#

Yup

lofty hamlet
#

const filter = (reaction, user) => { return reaction.emoji.name === '🌲' && user.id === message.author.id }; so i test this

late hill
#

The issue you're having however is that max is still set to 1

#

The collector ends after the first reaction that passes the filter

lofty hamlet
#

Nothing change

late hill
#

Yes

lofty hamlet
#

So ?

late hill
#

Because your next issue is collected.first()

lofty hamlet
#

How i can make this 🤔

late hill
#

The second won't be the first

earnest phoenix
#

Remove .first()

#

Collected is a collection

quartz hill
#

How do I clean hashmap in js?

lofty hamlet
#

@earnest phoenix not work and i can't remove .first because i need

#

So nobody can help me? 😦 ?

late hill
#

I don't use discord.js but I feel like message.awaitReactions().then() would wait till your collector is finished

earnest phoenix
#

Map.clear() Thonk

late hill
#

You probably wanna use message.createReactionCollector() instead

lofty hamlet
#

🤔

#

You can explain me what i do change ?

late hill
#
const collector = anothermessage.createReactionCollector(filter, options)
collector.on("collect", reaction => {
    //Code to execute everytime a reaction passed the filter
})```
earnest phoenix
#

@lofty hamlet pong

late hill
#

filter and options are the same as for awaiting the reactions

lofty hamlet
#

Oof i never use this

#

🤔

#

You can edit my code and explain ?

earnest phoenix
#

try yourself, its not hard

late hill
#

You can read the code

#

Follow it step by step in your head

lofty hamlet
#

It will not only be on this message though? If several people make this order at the same time ...

late hill
#
  • You create a reactionCollector on the message
  • You pass a filter to it, to make sure you only get the reactions you want
  • Pass some options to limit the time, amount of reactions, ..
  • You put a listener on the collector that fires for every reaction it collects
lofty hamlet
#

OOOFF

#

...

late hill
#

You're calling createReactionCollector() on a message

#

Which means it'll only be for that message

lofty hamlet
#

My first try

#

@late hill

#

But not work so 🤔

late hill
#

reaction is just one reaction

mossy vine
#

"Not work" oh boy

lofty hamlet
#

Does not work if you prefer

#

ahah

#

@late hill what ?

late hill
#

remove the first line in the collect event

#

You don't need it

lofty hamlet
#

Ok

late hill
#

And remove the additional emoji name check as you already check in the filter..

lofty hamlet
#

Oh my bad

late hill
#

Remove the random array too as said before..

#

👀

lofty hamlet
#

But does not work

late hill
#

What doesn't work

lofty hamlet
#

collector.on('collect', (reaction, reactionCollector) => { reaction.remove(message.author.id) arbrecut += 1 })

#

This

#

The reaction is not removed

late hill
#

reaction.remove() doesn't take args

lofty hamlet
#

🤔

late hill
#

Which means you just put reaction.remove()

lofty hamlet
#

But reaction.remove() the same does not work

late hill
#

oh

lofty hamlet
#

So i have this

late hill
#

You can optionally put a user id

lofty hamlet
#

Where ?

#

And for what ?

#

I'm trying to understand at the same time

late hill
#

Try to console.log() something

#

To see if it fires the event

slim gazelle
#

I apologize if this has been answered, or if I could be directed to the answer, but my bot has NOT been posting LIVE NOW notifications in my channel. How can I fix?

late hill
#

You're probably talking about a specific bot you added to your server

#

This isn't a support server for that

lofty hamlet
#

Test1 apparead

#

But Test2 doe not appered

late hill
#

And did you react to the message

lofty hamlet
#

Yes i react ahah i'm not stupid >-<

late hill
#

oh

#

bruh moment

#

You put the collector on the message

earnest phoenix
#

🛴

lofty hamlet
#

Hu ?

late hill
#

Not anothermessage

lofty hamlet
#

Oh ok

late hill
#

😂

lofty hamlet
#

It's work 👍 but actually the bot detect her reaction

#

lmao

#

😂

late hill
#

uhh

lofty hamlet
#

I have actually this

earnest phoenix
#

Return if the author of the reaction is the bot

late hill
#

The filter should stop that 👀

lofty hamlet
#

...

late hill
#

oh

#

you changed..

lofty hamlet
#

What ? lmao

late hill
#

Meaning you're filtering ONLY the bot's reactions

earnest phoenix
#

Yup

lofty hamlet
#

You say change this

late hill
#

Not the entire thing 😂

#

You should keep them as 2 different names

#

Preferably a name that actually gives information on what it is

#

Suggestion, name your bot's reply reply

lofty hamlet
#

Ok i have patch this

#

So

#

Ok thx i go continue my command 😉

#

If i have problem i contact you 😉

late hill
earnest phoenix
#

dbl dealer

earnest phoenix
#

icup

misty maple
#

My mate asking me to promote his website.

unique nimbus
#

Promoting bad

dusky marsh
#

Ick, particle.js

topaz sphinx
#

this is

#

so

#

stupid

#

i cant understand it

#

why doesnt it work

#

it dumps the info to some galaxy far far away and not its source directory

#

i need help

jolly sentinel
#

All I can think is instead of just doing the .json file, just use the actual link to the path you want to dump it to.

earnest phoenix
#

is java?

jolly sentinel
#

No

#

That's python

#

So specify a specific path instead, maybe? @topaz sphinx

#

Honestly that's all I can think of

topaz sphinx
#

2 things happens

#

first if i just keep it as it is

#

it just saves it in the home directory of the server

#

however

#

if i aim towards that thing

amber fractal
#

does a presence update cache a user? in d.js

topaz sphinx
#

"Memory error"

jolly sentinel
#

Doesn't json have a limit for data n shit

#

Don't quote me on that

amber fractal
#

The maximum length of JSON strings. The default is 2097152 characters, which is equivalent to 4 MB of Unicode string data.

jolly sentinel
#

I would doubt he's reaching that limit

amber fractal
#

But there is also no inherent size limitation to the JSON request. Any limitation would be set by the server parsing the request.

jolly sentinel
#

@topaz sphinx
All I can think about is changing how you write by going from that to
datastore.write(json.dump(dump_stuff))
(I believe that's the syntax?)

#

I think it does the same thing essentially but just check if it changes what happens

topaz sphinx
#

what

jolly sentinel
#

Your code should work so akkoShrug

topaz sphinx
#

json.dump isnt same as json.dumps

jolly sentinel
#

You're using json.dump

topaz sphinx
#

which works normally

jolly sentinel
#

I'm gonna stop trying to help because I've no clue how to fix it

topaz sphinx
#

but not here

jolly sentinel
#

Back to memes. Good luck.

topaz sphinx
#

ouf

#

:c

#

atleast it works if i do this

jolly sentinel
#

Do what

topaz sphinx
#

that works

jolly sentinel
#

Did my suggestion work

topaz sphinx
#

nope, gave error ASTomatoSmug

jolly sentinel
#

fuck

topaz sphinx
#

ye probs something to do with bad memory error, goddamn pythons

jolly sentinel
#

on the note of you saying pythons, that reminds me

#

my username looks like python akkoderp

topaz sphinx
#

yes thats why i had intentions to ping u LULW

jolly sentinel
#

i never had that intention, funnily enough

#

It was a random idea for a user

topaz sphinx
#

i see

#

it works good doe

#

after 15 hours

#

#2 in queue

jolly sentinel
topaz sphinx
#

yes <<<

storm oak
#

does anyone know how to use await
presence

#

await bot.change_presence(activity=discord.Game(name="a game"))

#

something like this

lime jewel
#

await bot.change_presence(game=game(game="some game"))

#

@storm oak

storm oak
#

alright

#

i put this under @client.event

lime jewel
#

No

storm oak
#

or when gets ready

#

im using rewrite if thats anything

lime jewel
#

@client.event
async der on_ready():
await bot.change_presence(...)

storm oak
#

says game is a unexpected arugment

jolly sentinel
#

one sec

storm oak
#

ok

jolly sentinel
#

game= is activity=
game() is discord.Game(name="")

storm oak
#

ok

jolly sentinel
#
@client.event
async def on_ready():
    activity = discord.Game(name="activity")
    await client.change_presence(status=discord.Status.online, activity=activity)```
#

@storm oak

storm oak
#

@jolly sentinel thx

#

thanks*

jolly sentinel
#

next time, read the docs

storm oak
#

yeah

wicked pivot
#

can anyone help me for an anti raid command that edits a role?

next scaffold
#
if (msg === prefix + "daily" | msg === mention + "daily" | msg === mention1 + "daily") {
        return dbl.hasvoted(sender.id).then(voted => {
          if (voted) {
            console.log (sender.username + "has voted!");
            message.delete().catch(O_o=>{});
            message.channel.send({embed: {
            color: 0x00bdf2,
            title: "Thanks for voting!",
            description:(`This command is still under testing, and no rewards are currently available. However, thanks for your help!`),
            footer: {
                icon_url: bot.user.avatarURL,
                text: "MusEmbed™ | Affiliated with Paraborg Discord Bots"
            }
  }});
        } else {
          message.delete().catch(O_o=>{});
          message.channel.send({embed: {
            color: 0x00bdf2,
            title: "You haven't voted for us yet!",
            description:(`Vote [here](https://vote.musembed.tk/) and do this command again to claim your voting reward.`),
            footer: {
                icon_url: bot.user.avatarURL,
                text: "MusEmbed™ | Affiliated with Paraborg Discord Bots"
            }
  }});
        }});
}
#

anyone sure what's wrong with that lol

#
(node:3687) 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(). (rejection id: 2)
#

basically spits out this

#

oh BTW sender is defined

#

as message.author

#

I suck at async things

earnest phoenix
next scaffold
earnest phoenix
#

java

next scaffold
#

.js

earnest phoenix
#

i dont do java

#

i do python

next scaffold
#

F

clever radish
#

Question: Currently in the process of developing a web dashboard but was considering migrating from SQLite to an alternative DB while I'm at it. What do people feel is the best option / what do you use? (MySQL, PostgreSQL, MongoDB, SQLite, etc.)

earnest phoenix
#

Mongo all the way

#

😃

shy rose
#

@clever radish from sqlite your gonna want something like mysql

#

@earnest phoenix mongo is nosql so moving from an sql based system to a nosql based system isnt exactly clean carry over

earnest phoenix
#

true

#

I read it as he was developing one and hasnt had any data in it yet

shy rose
#

if you want nosql though redis is proven to be around 3-4x faster than mongo

#

mongo really starts to slow down on scale

earnest phoenix
#

oh seriously?

clever radish
#

Ah, sorry bout; nah, have a fair amount of data unfortunately that would need to be migrated over

earnest phoenix
#

I use mongo for minecraft permissions and my modmail bot

#

🤷

shy rose
#

@clever radish yeah so mysql is probably the way to go

clever radish
#

Hmm, would maria be a good choice then? (over just standard mysql)

shy rose
#

im not familair with maria so cant say

earnest phoenix
#

o:

shy rose
#

left axis is solid line scale
right axis is the dotty line scale

earnest phoenix
#

I use maria for my website

#

its not bad but i dont have much experience with it

shy rose
#

is it sql or no sql?

earnest phoenix
#

Im not sure i

#

i think

#

it is

clever radish
#

believe it's just a fork of mysql (supposedly more feature-rich)

shy rose
#

oml way to be a special child it supports both

earnest phoenix
#

it is a fork

shy rose
#

as of maria v10 is supports both nosql and sql mode

clever radish
#

oh, ffs lol XD

shy rose
#

which is uh unusual

#

ive never seen that in a db

#

reading an "unbias" article Why Switch to MariaDB?

excuse me where is the Why Switch to MySql? header

#

but yeah mysql is pretty much no code change needed to move from sqlite

#

other than updating the sql calls functions the rest is the same all queries carry over

#

@clever radish depending on size that might help not having to update the queries

clever radish
#

Ok, cool! Appreciate the help, was leaning towards mysql / Maria anyway, so was nice to get some extra opinions 😄

fleet iron
#

Danny didnt like when I told him Mongo would need a nice big rewrite 😄

shy rose
#

sorry not familiar with maria but for ease a sql based db will help

#

yeah sql to nosql transition isnt fun

sinful lotus
#

I use mariadb

#

so far never had problems

#

2ms usually in locally hosted server

dusky marsh
#

Doesn't Discord use Mongo? I can't remember if they went from Mongo to Postgres or the other way around.

shy rose
#

think they moved recently from one of them yeah

sinful lotus
#

They use cassandra now

shy rose
#

assuming thats nosql?

sinful lotus
#

yes

fierce thorn
#

They use Cassandra for data

#

MongoDB and Redis too but for other data

late hill
#

I got an error because a message with type 8

#

tf is 8 ??

#

Is it the server boost messages maybe?

earnest phoenix
#

hnmm

#

what library MEE6 uses?

lapis meteor
#

Ask to @solid gale

#

@earnest phoenix

#

or join mee6's support server and ask to admin. NO MODS ONLY ADMIN

modest remnant
#

What I do help me

spring ember
#

First of all reset that bot token

#

Second of all what even is this

#

Third of all ARE YOU TRYING TO RUN THE "BOT" ON YOUR PHONE???

earnest phoenix
#

oml

modern sable
#

its not even a legit token

spring ember
#

Oh

modest remnant
#

Tell me what I do first

modern sable
spring ember
#

Do you know Python?

modest remnant
#

@spring ember yes

slender thistle
#

Let's hope so

spring ember
#

bot token ("") is not valid syntax

slender thistle
#

Was it literally that

spring ember
#

I recommend learning python a little deeper before starting to develop a bot

#

@slender thistle yes

slender thistle
#

Oh man

modern sable
#
print("hello , python !!")
bot token ("insert malformed token here")

thats what the code was

spring ember
#

Yes

slender thistle
#

Oh

spring ember
#

opens hello world tutorial
I fully know Python now

slender thistle
#

I honestly wanted to blame it on the docs but after seeing that... I realized I was wrong

earnest phoenix
#

hmm

lofty hamlet
#

Hi

#

How i can verify if a string content Return to the line ?

mossy vine
#

string === "Return to the line"

lofty hamlet
#

Ahah

#

Lmao

#

So who can help me ?

mossy vine
#

the fuck thats literally how you do it

modest remnant
#

Which way is best to host a bot android?

mossy vine
#

you cant and dont

modest remnant
#

@mossy vine what

lofty hamlet
#

@mossy vine line break wtf

mossy vine
#

you cant host a bot on a phone

#

@lofty hamlet what

lofty hamlet
#

Line wrap

#
In middle of this text

In middle of this text
#

This

mossy vine
#

a new line?

lofty hamlet
#

No

#

Wtf

#

Look

modest remnant
#

@mossy vine why

lofty hamlet
#
In middle of this text

In middle of this text
earnest phoenix
#

just... do us all a favour and dont host a bot on android yeah?

mossy vine
#

so you want to check for an empty line, or if a new line starts?

opaque eagle
#

@modern sable unmentionable name here

lofty hamlet
#

Empty line if you want

#

I speak \n this but in a string

mossy vine
#

split the string at \n, loop through the lines and check if its empty

modest remnant
#

@mossy vine why I don't host a bot android

mossy vine
#

@modest remnant you cant

modest remnant
#

@mossy vine why

lofty hamlet
#

@mossy vine 🤔

mossy vine
#

do i really have to write an essay on why you cant host bots on a phone

earnest phoenix
#

no

#

its possible

#

With glitch, but its not on phone

quartz kindle
#

you probably need a rooted android to host on it

#

there are probably shady ways to do it without root, but its very complicated and will probably overheat your phone and will probably lag a lot

earnest phoenix
#

the solution is, buy a pc

modest remnant
#

Pc?

earnest phoenix
#

Computer mmLol

modest remnant
#

Anyone make a bot for me

crude aurora
#

Use a public bot

#

or pay someone willing

#

first is free, second is not

modest remnant
#

Not

mossy vine
#

either use an already existing bot

#

or pay someone to make one

modest remnant
#

Pay someone to make

#

Anyone make bot for me if yes DM me and I pay for this

modern sable
restive light
#

how can i do something like with javascript

If time = 07:00 then
sendmessage

earnest phoenix
#

use moment

#

or if(Date.now() === 'Unix Timestamp')

#

Unix timestamp is 1559653024

restive light
#

i need time function

#

for example
If time == 07:00 then
send "goodmorning!" to #loby

earnest phoenix
#

yup use moment

#

or wair

#
if(currentdate === 'date') {
message.channel.send('Good morning')
restive light
#

how can i write time to date

#

can you write an example code here?

#

if time = 7 then send hello

earnest phoenix
#
var currentdate = new Date();
setInterval(function()
{ if(currentdate.getMinutes() == currentdate.getHours()) { 

message.channel.send('Good morning') 

 } }, 1000 * 60)```
#

i cant send u the exact code, i just give you a example

restive light
#

i understand the code but

#

what 1000x60 means in there?

jolly sentinel
#

For the interval, I believe

restive light
#

1000 * 60 = 07:00 am?

earnest phoenix
#

No

#

Its just check every minute the current time

fiery stream
#

Wwdc is best thing

jolly sentinel
#

also wouldn't you need to assign the var in a loop so it constantly changes

restive light
#

how it can check 07:00 am?

earnest phoenix
#
const client = new Discord.Client();

client.on('message', message => {
    //...
});

client.on('ready', () => {
    setTimeout(function(){ // in leftToEight() milliseconds run this:
        sendMessage(); // send the message once
        var dayMillseconds = 1000 * 60 * 60 * 24;
        setInterval(function(){ // repeat this every 24 hours
            sendMessage();
        }, dayMillseconds)
    }, leftToEight())
})

function leftToEight(){
    var d = new Date();
    return (-d + d.setHours(8,0,0,0));
}

function sendMessage(){
    var guild = client.guilds.get('guildid');
    if(guild && guild.channels.get('channelid')){
        guild.channels.get('channelid').send("Good Morning");
    }

}

client.login("token");```
#

@restive light

modest remnant
#

@fossil oxide

mossy vine
#

why did you tag oliy

unique nimbus
#

ping pong

earnest phoenix
#

Its sending every day at 8 hours "Good Morning"

restive light
#

"8" is time, anothers are seconds / milliseconds or something like that?

unique nimbus
#

setHours

earnest phoenix
#

yup

unique nimbus
#

oof

restive light
#

thanks for helping man

unique nimbus
#

i dont do js

earnest phoenix
#

np

jolly sentinel
#

Google Channel helps another soul not have to look at the docs.

restive light
#

it works wrong

#

sends morning when i open bot

#

doesnt sends at every 8 am

earnest phoenix
#

@restive light

fiery stream
#

Yo is swift Lang hard

#

??

earnest phoenix
#

What?

#

@fiery stream

restive light
#

thats complicated

fiery stream
#

Like how much

earnest phoenix
#

No very easy @restive light

restive light
#

and my bot isnt have any #require

#

works with one .js

quartz kindle
#

its not easy to do what you need

earnest phoenix
#

To make things a little easier, an object literal syntax is also supported, like in this example which will log a message every Sunday at 2:30pm:

var j = schedule.scheduleJob({hour: 14, minute: 30, dayOfWeek: 0}, function(){

  console.log('Time for tea!');

});
#

Example from the package

quartz kindle
#

you have to:
when bot starts, check how much time left for the next 7am
create a setTimeout function with that much delay;
when sending, create another setTimeout for 24 hours later

mossy vine
#

or a setInterval that is triggered by a setTimeout once after the bot is up?

quartz kindle
#

also possible yes

restive light
#

i thought something like
string time = system.time
if time = ("07:00")
send hello

quartz kindle
#

yes, but it doesnt work like that

restive light
#

yea

#

bullshit of java

quartz kindle
#

because the system doesnt tell you what time is it. your bot has to ask the system

#

so your bot has to ask the system every minute to check what time it is

#

or you just do the math to find how long until the next 7am

mossy vine
#

wait are you using java or javascript

quartz kindle
#

its much better to do the math than to ask every minute

restive light
#

js

quartz kindle
#

all languages are like that, its not javascript's fault

earnest phoenix
#

scheduled tasks > checking x every y seconds

quartz kindle
#

the only hard part is finding out when the next 7am happens, and its also not that hard

earnest phoenix
#

grab the current utc time and do the math

quartz kindle
#
let now = new Date(); // what time is it right now
let hour = now.getHours(); // what hour it is right now;
let day = now.getDate(); //what day it is right now;
if(hour >= 7) { // if hour is bigger or equal to 7, meaning 7m already passed today
    day = day + 1; // set day for tomorrow
}
let next7am = new Date(now.getFullYear(),now.getMonth(),day,7);
let howLongUntilThen = next7am - now;
#

(untested)

lofty hamlet
#

Hi how i can verify if my string content line wrap ?

earnest phoenix
#

wat

lofty hamlet
#

Line break

#

In middle
mossy vine
#

i literally told you wtf

lofty hamlet
#

Oh ok thx

#

And i have a problem

#
                let foundInText = false
                for (var i = 0; i < unblacklisted.length; i++) {
                    if (collected.first().content.includes(unblacklisted[i])) {
                        foundInText = true
                    }
                }
                if (!foundInText == true) return message.channel.send(`Vous avez utilisé un caractère interdit. Voici les caractères autorisés (Veuillez retaper la commande pour vous enregistrer) : **${unblacklisted}**`.replace(/,/g, " "))```
#

This is my system for accord letters for my string

earnest phoenix
#

what

mossy vine
#

what

lofty hamlet
#

However it does not work because if it contains a letter granted even with letters not granted it passes

earnest phoenix
#

@lofty hamlet you know you can restrict number by if(isNaN(args[0]))

lofty hamlet
#

No i d'ont want this ahah

#

You read my message ?

earnest phoenix
#

Ohhh

next wedge
rocky mesa
next wedge
#

YES

#

thanks internet

rocky mesa
#

also

#

I can see ur youtube api key

next wedge
#

then what im not using it xD

mossy vine
#

anyone can abuse it

#

potentially leading to account suspension

next wedge
#

im deleted that project 2 months ago soo

#

btw ty

slender thistle
next wedge
#

never xD

#

its the latest .-.

slender thistle
#

Don't subclass commands.Cog if you don't wanna update

#

No, it's not. Latest version doesn't give that error

next wedge
#

hmm

#

but my friend have the same dc.py and works for him

#

this su*ks

slender thistle
#

Compare your d.py version with pip show discord.py

#

Like honestly why don't you just update your d.py

#

Save headache for both of us

next wedge
#

have to rewrite the whole bot then

slender thistle
#

Are you using 0.16.12?

next wedge
#

yeah

slender thistle
#

Latest dblpy doesn't support any version below 1.0.0

next wedge
#

wait

#

oh

#

im need an outdated version xD

#

lol thats fixed it thanks

slender thistle
#

As all d.py versions other than 1.1.1+ are discontinued, dblpy decided to drop support for those versions too

next wedge
#

lol

earnest phoenix
#

Someone know how to do a countdown in js ? Like 24 days 5 hours and 51 minutes left until release

buoyant wagon
#

you can subtract dates

lofty hamlet
#
                let foundInText = false
                for (var i = 0; i < unblacklisted.length; i++) {
                    if (collected.first().content.includes(unblacklisted[i])) {
                        foundInText = true
                    }
                }
                if (!foundInText == true) return message.channel.send(`Vous avez utilisé un caractère interdit. Voici les caractères autorisés (Veuillez retaper la commande pour vous enregistrer) : **${unblacklisted}**`.replace(/,/g, " "))```
#

However it does not work because if it contains a letter granted even with letters not granted it passes

mossy vine
#

because the loop logic is completely wrong

earnest phoenix
#

Yeah but substract date just returning the number of days

buoyant wagon
#

and time

lofty hamlet
#

And how i can return if the string content line break ?

mossy vine
#

also what the fuck !foundInText == true oml

lofty hamlet
#

@mossy vine all work except the flaw that I said

buoyant wagon
#

you don't need == true

mossy vine
#

nothing is working in that code

#

at least shouldnt

lofty hamlet
#

I say this code works

#

except the flaw that I said

mossy vine
#

just use regex instead of a huge unreadable array

lofty hamlet
#

That's not the problem

mossy vine
#

it is

#

you are looping through the array

#

and thats just fucking stupid

#

and is also whats causing your error

lofty hamlet
#

I don't know regex

mossy vine
#

also im 90% sure that if (!foundInText == true) return isnt doing what you want it to

#

you are literally using regex in that code

lofty hamlet
#

No, if (!foundInText == true) return

#

Works

#

The problem is :

#

When i use unblacklist letter with blacklist letter it passes

mossy vine
#

yes

#

because youre using an array and the loop logic is completely wrong

#

it makes no sense at all

opaque eagle
#

Just check for higher level characters instead of storing valid ones in an array

lofty hamlet
#

@mossy vine so suggestion for patch this ?

#

@opaque eagle what ?

mossy vine
#

use regex

quartz kindle
#

^

lofty hamlet
#

I don't jnow regex what is this ?

quartz kindle
#

regular expression

#

its a pseudo-language for matching strings

lofty hamlet
#

🤔

#

How i can adapt my code with this ?

quartz kindle
#

javascript includes regex by default, use can use it like this for example: string.replace(/regex here/options,replace with)

#

what exactly do you want to do?

lofty hamlet
#

I want maje a granted letter and all of the other caracters is blacklist

#

let = unblacklisted = ["a", "z", "e", "r", "t", "y", "u", "i", "o", "p", "q", "s", "d", "f", "g", "h", "j", "k", "l", "m", "w", "x", "c", "v", "b", "n", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-", "_", "'", "é", "è", "à", "ç", " ", "\n"]

#

Is my granted letter

quartz kindle
#

so if people type any letter that is not in that list, they get an error?

lofty hamlet
#

Yes

quartz kindle
#

why do you have "register" if you have the individual letters?

lofty hamlet
#

No fail

#

Register is remove

#

Fail

earnest phoenix
#

how to export something from a setInterval(function... ?

quartz kindle
#

what about capitals @lofty hamlet ?

lofty hamlet
#

@quartz kindle i add this after

#

So don't need

#

tolowercase

#

I use

#

Just my system work but i have a fault

quartz kindle
#

string.match(/[^a-z0-9\s-_'éèàç]/g)

lofty hamlet
#

?

#

What is this ?

quartz kindle
lofty hamlet
#

?

earnest phoenix
#

var x = setInterval(function() {

  var now = new Date().getTime();

  var distance = countDownDate - now;

  var days = Math.floor(distance / (1000 * 60 * 60 * 24));
  var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
  var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
  var seconds = Math.floor((distance % (1000 * 60)) / 1000);
  
    const embed = new Discord.RichEmbed()
             .setColor('#00ff00')
                  .setTitle("Frontshot.io | Release")
                  .setDescription(`Released in **${days}** days, **${hours}** hours, **${minutes}** minutes, **${seconds}** seconds.`)
                  .addField("Release Date", "25/07/2019")
                  .setFooter("Frontshot.io")
  
  if (distance < 0) {
    clearInterval(x);
    embed.setDescription('Countdown Finished')
  }
  
  
}, 1000);
    

    
    message.channel.send(embed)``` error: embed not defined
quartz kindle
#

if a person types normal text, the function returns null

#

if the person uses blacklisted characters, the function returns an array of the bad characters they used

#

so just check it. if it returns null, pass, if it returns an array, dont pass

earnest phoenix
#

if someone know how to resolve this without adding "message.channel.send" in the interval

lofty hamlet
#
                if (!collected.first().content.match(/[^a-z0-9\s-_'éèàç]/g)) return message.channel.send(`Vous avez utilisé un caractère interdit. Voici les caractères autorisés (Veuillez retaper la commande pour vous enregistrer) : **${unblacklisted}**`.replace(/,/g, " "))``` @quartz kindle
#

If i have understand

#

But does not work

mossy vine
#

you do not need the blacklist at all

#

sorry, unblacklist

#

also wtf let = unblacklsited = []

#

what

earnest phoenix
#

oh no its good,
I just needed to clear the interval

quartz kindle
mossy vine
lofty hamlet
#

@mossy vine this is code of tim

#

Wait plz xyber

quartz kindle
#

@earnest phoenix dont do that

#

you're trying to send a message every second

#

thats too much

#

do something like 5 seconds at least

#

and you can use message.edit instead of new messages every time

earnest phoenix
#
var countDownDate = new Date("July 25, 2019 00:00:00").getTime();

var x = setInterval(function() {

  var now = new Date().getTime();

  var distance = countDownDate - now;

  var days = Math.floor(distance / (1000 * 60 * 60 * 24));
  var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
  var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
  var seconds = Math.floor((distance % (1000 * 60)) / 1000);
  
    const embed = new Discord.RichEmbed()
                                .setColor('#00ff00')
                  .setTitle("Frontshot.io | Release")
                  .setDescription(`Released in **${days}** days, **${hours}** hours, **${minutes}** minutes, **${seconds}** seconds.`)
                  .addField("Release Date", "25/07/2019")
                  .setFooter("Frontshot.io")
  
  if (distance < 0) {
    clearInterval(x);
    embed.setDescription('Countdown Finished')
  }
  
  message.channel.send(embed).then(e => {
    clearInterval(x)
  })
  
  
}, 1000);```
#

its not good ?

lofty hamlet
#

Exemple @quartz kindle my string : BNeb!ea

and if (!collected.first().content.match(/[^a-z0-9\s-_'éèàç]/g)) return message.channel.send(`Vous avez utilisé un caractère interdit. Voici les caractères autorisés (Veuillez retaper la commande pour vous enregistrer) : **${unblacklisted}**`.replace(/,/g, " ")) does not work

It's very strange that it shows me the message quan I use only tiny letters

earnest phoenix
#

oh no its good, i just have deleted the interval

#

No utility

quartz kindle
#

@lofty hamlet what is not working?

lofty hamlet
#

The system

quartz kindle
#

remove the ! at the beginning

lofty hamlet
#

Yes it's good i test

#

I can juste enter the tiny letters (lowercase)

#

@quartz kindle

quartz kindle
#

?

#

so it works or not?

lofty hamlet
#

No

quartz kindle
#

what doesnt work?

lofty hamlet
#

I can juste enter a string with lowercase

mossy vine
#

yes

#

add A-Z to the regex as well

quartz kindle
#

you said no capitals

mossy vine
#

^ also that

quartz kindle
#

you said you do .toLowerCase

lofty hamlet
#

?

quartz kindle
lofty hamlet
#

Yes fail wait

#

It's work thx u !

#

So \n is not blacklist ok

#

I go read your response xyber

warm sail
#

Question about best practices:
My bot has multiple modules so I want to allow special prefixes for certain modules.

Example:
My bot has > as a default prefix.
All commands in to "osu" module start with osu! (e.g. osu!stats).
Currently users need to type >osu!stats.

Would it be considered good or bad practice to also allow osu!stats on its own, if osu! is considered a prefix for that module?

quartz kindle
#

having per-module prefixes wouldnt be considered good practice, since it increases the chances of overlapping prefixes with another bot

#

you could add some sort of prefix modifier like tatsumaki does, t! and t@

warm sail
#

Ok, I'll leave out the module prefixes and use custom aliases (programmable triggers) then

#

Actually, is there a list of best practises somewhere on this server? Like a checklist of things to consider for bot validation?

quartz kindle
#

there is a list of general bot best practices

warm sail
#

Ok, pretty much common sense 😃

#

(for an experienced dev at least)

quartz kindle
#

yup :)

slim heart
#

with node-ipc is it possible to send back a response?

quartz kindle
#

pretty sure it is

solid gale
#

@earnest phoenix we don't use a lib. It's all custom code.

earnest phoenix
#

a

acoustic citrus
#

does anyone know how to get the guild id on memeber join/leave with discord.js?

buoyant wagon
#
member.guild.id
acoustic citrus
#

oh aight thx

unique nimbus
#

@buoyant wagon thats the same in python

#

kek

#

its legit the same

#

rewrite tho

west spoke
#
 def is_nsfw():
    
        
        
        session=aiohttp.ClientSession()
        nsfwheaders= 'token'
        
        cstats= session.get(url="https://discordapp.com/api/channels/"+str(message.channel),headers=nsfwheaders)
        print(cstats)
        return cstats
#

I'm trying to homemake a is_nsfw variable in async

#

I'm not really getting a error

#

But it wont show "true" or "false" or even anything other than a <generator object at 0x00000000000> or sth

slender thistle
#

cstats returned a coroutine

#

You need to await it, which you can't do outside of async functions

west spoke
#

It's in the async function on_message

slender thistle
#

then await session.get

slender thistle
#

Your is_nsfw function is not an async one

west spoke
#

It is

unique nimbus
#

I think neko is trying to make one

west spoke
#

I changed my eval command to await eval(xx)

#

First

#

Ping me if you know qwq

slender thistle
#

Send me your whole code

west spoke
#

K

#

 async def is_nsfw():
    
        #data= (discord.http.HTTPClient.request(
            #self="_locks",route= '/api/channels/'+message.channel.id+"/nsfw"))


        
        #channeldata = [d for d in data if d['id'] == message.channel.id][0]
        session=aiohttp.ClientSession()
        nsfwheaders= token    
        cstats= session.get(url="https://discordapp.com/api/channels/"+str(message.channel),headers=nsfwheaders)
        print(cstats)
        nsfw="nsfw"
        return str(cstats)
        
    
        #channel is safe to run nsfw content
slender thistle
#

Why all that

west spoke
#

Stuff I just haven't deleted yet

#

Stuff with # is stuff I've tried but haven't worked

slender thistle
#

Are you still using 0.16.12 or is it 1.0.0+

west spoke
#

0.16.12

slender thistle
#

Ah, okay then, I get it now

west spoke
#

?

radiant solstice
#

Hello

slender thistle
#

It needs to be await session.get because that will return a coroutine
Then, cstats will have an attribute, .json, which will be a method you have to await too

west spoke
#

Ok

wicked pivot
#
const Discord = require('discord.js')

module.exports.run = (bot, message, args, prefix) => {
    let membre = message.guild.roles.get('585256713557377026')
    membre.edit({
        data: {
            SEND_MESSAGES : false
        },
        reason: 'Hex Bot'
    }).catch(error => client.catch(error))
};

module.exports.help = {
    name: "raidon"
};```
#

TypeError: Cannot read property 'id' of null

earnest phoenix
#

I cant find id here @wicked pivot

wicked pivot
#

how do I do?

quartz kindle
#

the error is not from that code, its from somewhere else

exotic wave
#

How to fix it?

#

DM or mention please

static matrix
#

Hi guys

#

Google cloud or amazon aws

#

Which can i prefer?

west spoke
#

AWS is easier to upload to depending on the lang

#

Also a website hoster

#

@static matrix AWS s3 for storage.
AWS route 53 for web hosting

whole hamlet
#

Has anything changed with the client.fetchUser() method?

west spoke
#

What lib+ver

#

I think that's py rewrite

slender thistle
#

d.js has fetchUser

topaz sphinx
#

i'm actually stuck, why cant i access class error css

#

alright

#

i can access it by using h1.error in the html using <style>

#

but i cant access it trough a css

#

what the fuck?

mossy vine
#

use inspect element to verify that the css file is actually loaded

#

in chrome just go to the Sources tab

opaque eagle
#

Why do u have a <header> tag outside body?

topaz sphinx
#

header is for the top bar

#

or

#

im not sure im too stupid to use html, but i gotta learn it

#

i do have it right there

#

it didnt update

#

what

#

alright

#

some issue with it

#

i cant even understand

#

to begin

#

@opaque eagle tbh i am bad at html

#

but

#

apparently it ignores my thing

#

it doesnt exist in the chrome

opaque eagle
#

Why don't u just say index.css instead of the {{}} stuff?

topaz sphinx
#

hmhm good point

#

yes i fix

#

but

#

its still not really

quartz kindle
#

whats your environment? where are you developing?

#

local files and opening with browser?

topaz sphinx
#

Visual Studio Code

#

its completly dead

#

but im trying to change Gofven's thingy

#

from black to red

quartz kindle
topaz sphinx
#

wait it cant be already red can it

quartz kindle
#

it is

#

which browser are you testing in?

topaz sphinx
#

is it possible my browser caches the

#

google chrome

quartz kindle
#

do this

warm sail
#

^

earnest phoenix
#

go into anonymous/incognito mode to make sure it isn't your cache or do that

topaz sphinx
#

wait here

#

where

warm sail
#

F12

quartz kindle
#

^

warm sail
#

for web dev console

#

best thing about Chrome 😃

topaz sphinx
#

wait where u disable cache

warm sail
#

In the "Network" tab after you press F12

#

As long as the developer tools are open, it will force refresh your page every time

topaz sphinx
#

FINALLY HYPERPOGGER

frozen tiger
#

I would like to split a string every ":" EXCEPT if this ":" is just after "http" or "https".. Do you know how to do it?

I'm using Java so regex could do the trick?

buoyant wagon
#

/(?<!(http|https)):/g

frozen tiger
#

nah I found a better solution 😉

#

thanks

robust acorn
#

Can python bots detect if you boost a server?

topaz sphinx
#

cloudflare is being a cuck

#

anyone knows how to disable caching at cloudflare

buoyant wagon
#

boosting is new so probably not

#

however there is a booster role

robust acorn
#

Oh

#

How do you enable booster role?

earnest phoenix
#

ayyyy web socket connection closed with no reason killl meeee

hoary helm
#

help
when trying to get data.selftext from reddit's JSON it returns null
but when viewing it in the browser, it actually shows text (same post)
data.title and data.url work fine

#

wait i'm dumb nevermind, fixed it

topaz sphinx
#

need some quick help

#

text container at bottom, i tried multiple ways to move it upwards, but with no luck

#

i want it to be movable relative to the "botInfoContainer"

#

i mean botInfoContainer2 have relative position, doesnt it mean if i do botInfoDescritpions movement absolute, it should move?

topaz sphinx
#

nvm i solved it

#

float: left and float: right

#

was real saviors

digital sparrow
#

anb

bitter night
#

fs.appendFileSync(`C:/Users/TreverGserv.1033/Desktop/APlus/Storages/${user}.txt`, (modlog), {"flags": "a"}), (err) => { if (err) console.log(err); };
I'm using this code but fs wont make the file if it doesn't exist

#

The documentation says it should make it

near ether
#

how would you check if a user has voted in the last 12 hours?

topaz sphinx
#

webhook

bitter night
near ether
#

oof

#

ty

warm sail
#

Hey all. Another "best practice" question:

I programmed by bot to fall back to DMs in case a valid command is executed, but the response could not be posted in the same channel.
Is falling back to DMs ok in this scenario?

And a more technical question about shards:

From what I read, I understood that private channel message are only received on shard 0. Is this correct even if shard x sends a DM? Would a user response still go to shard 0?

shy rose
#

anything dm is put onto shard 0

#

shard 0 sending back to a dm as far as its concerned its just another channel

#

you dont need anything special to allow your bot to reply to a dm if its sharding or not

#

any shard is allowed to send to a dm

but all user messages go to shard 0

#

any shard can send to any channel your bot is in btw (even if its not that shard controlling that server)

#

only receive events are handled per shard and voice

#

does that help? @warm sail

warm sail
#

It's more the other way around. Here's my current scenario:

  1. A user sends valid command with ambiguous input for which user should be affected, for example.
  2. For whatever reason the bot cannot reply in that channel, so it falls back to DM (let's assume we're on shard 2)
  3. The user clarifies the input via DM

I'm guessing that DM would go to shard 0 and not shard 2, by what you said.

shy rose
#

thats right yeah

warm sail
#

😦 ok, I need to rewrite a bunch of my fall-back routines then

shy rose
#

shard 2 is allowed to send the message and also the reactions
but shard 0 will be receiving the users response

#

important to note any command that needs context your going to need to tell shard 0 about it

warm sail
#

Yeah, I want my shards to be independent of each other, so I need to assume that a user cannot "answer" via DM if it's not shard 0.

shy rose
#

if the command you made the user give in dm is enough to tell shard 0 how to respond then thats good enough

warm sail
#

Yeah, I'll still send responses, but they will terminate the command instead of waiting for additional input.

#

If DMs are involved, that is.

shy rose
#

tbh if your bot doesnt have send permission there is probably a reason for it and the user wont want a dm for it

thats my experience at least

warm sail
#

hence my "best practice" question

shy rose
#

like locking bots to channels cause x bot wont let you change the prefix so you try isolate it

you wouldnt want a dm from it every time you use the other bot

#

unless its an uber important thing i wouldnt send dm as a fallback

warm sail
#

ok, thx for the help and advice. I nees to think about how I want to solve this

shy rose
#

if your just starting then sharding is a long way off so dont worry bout it

#

think in my bot only time i dm someone is when they send the help command

or when they claim an api token cause those probably shouldnt be public lol

late hill
#

yeh dms when a bot isn't able to reply could be annoying

#

but "tbh if your bot doesnt have send permission there is probably a reason for it and the user wont want a dm for it" isn't always true
It happens a lot that ppl complain about a bot not working simply because they forgot to give it send-messages end-usertm

shy rose
#

yes thats painful lol

late hill
#

Basically both scenarios aren't great

#

But doing the DM requires some extra code so- skip

#

😂

warm sail
#

I forgot to mention that I check channel perms before executing a command.

#

So I would only DM if a command was executed but perms went missing in the mean time. Otherwise the command wouldn't have been executed at all.

shy rose
#

i just send and hope for the best GWspenderLemon

earnest phoenix
#

Hi

near igloo
#

Hello bot developers i need your help to deveload a good bot for my server+ for this server too

#

i need your help to deveload this bot and i am very new to this bot develoaping pogram, and it is kinda hard for me{ cuz i only know html programming plz i need your help and i gess that every 1 in this server will help me

#

thank you

#

from=Pgoldy

cursive dagger
#

Ok do u have any bot already?

#

Or are you completly new

#

@near igloo

wraith cipher
#

He's completely new ig

cursive dagger
#

yea

wraith cipher
#

Cause he said he only knows html

cursive dagger
#

Ok

#

Gimmie a sec ill check rules

near igloo
#

im trying to learn this programming

wraith cipher
#

Which lang are you triying to learn ?

near igloo
#

and notepad++

#

gtg im going to trip

cursive dagger
#

You should google a tutorial

lofty bane
#

hi

#

can i ask for a help

cursive dagger
#

yes

lofty bane
#

epic

cursive dagger
#

y?

lofty bane
#
const { Client, RichEmbed } = require('discord.js');
const client = new Client();
const usedCommandRecently = new Client();


client.on('message', message => {

 
     var prefix = "!" ;

     let args = message.content.substring(prefix.length).split(" ");
     
     switch (args[0]) {
         case 'cooLdown' :
            if(usedCommandRecently.has(message.author.id)){
                message.reply("You Cannot use this command now! wait nother 30 secound");
            } else{
                message.reply('You are not in the wait time! this is RangerZero Command');
                
                usedCommandRecently.add(message.author.id);
                setTimeout(() => {
                    usedCommandRecently.delet(message.author.id)
                }, 30000);
                
            }
        
        break;
     }    
});

this is my codes why when i run the bot he say that "usedCommandRecently.has" not a function

#

i cant understand

#

^^

exotic wave
#

Because .has doesn't exist maybe

lofty bane
#

how ?

slender thistle
#

delet?

lofty bane
#

?

#

any one know the reason of this error

#

?

vague chasm
#

@lofty bane ik

lofty bane
#

@vague chasm ?

late hill
#

is usedCommandRecently supposed to be a Client

#

..

vague chasm
#

change const usedCommandRecently = new Client()
to let discord = require('discord.js') const usedCommandRecently = new discord.Collection()

#

I am 80% sure you have to use a collection

#

@lofty bane

late hill
#

Or consistency and add Collection to the stuff you already import

vague chasm
#

and also make it delete instead of delet

#

Magic0 reply if it worked now

lofty bane
#

ok iam tring it

#

but wait

#

oh sry sry

vague chasm
#

ok

lofty bane
#

redstone

late hill
#

'cooLdown' also has a random uppercase

#

and you put secound

vague chasm
#

^

late hill
#

Might be a good idea to get a spellings checker

vague chasm
#

yes magic0?

lofty bane
#

it worked but new error was appeard

vague chasm
#

what is it?

lofty bane
#

usedCommandRecently.add is not a function

vague chasm
#

make it .set

#

not .add

lofty bane
#

ok iam tring

#

this

late hill
#

Yeh

lofty bane
#

oh it worked ❤
@vague chasm

vague chasm
#

ok

late hill
#

👀

lofty bane
#

ty wesley too

#

XD

#

1 hour trying to solve this problem

earnest phoenix
modern sable
#

um

#

reset that token, ty

slender thistle
#

Oh man

cursive dagger
#

And what is your problem?

earnest phoenix
#

nvm

slender thistle
#

Errors on the screenshot

#

Undefined variables, not reading the migrating docs

cursive dagger
#

Import time, use ctx.send instead of using send_message

earnest phoenix
#

ik about that

#

but nvm found the problem

slender thistle
#

ctx.send in a function that doesn't have ctx

#

Hmm...

#

@earnest phoenix IDs are now int since you upgraded your discord.py

#

I suggest using f-strings if you are on Python 3.6+ or otherwise .format

earnest phoenix
#

ty

#

async VS await

ruby dust
earnest phoenix
#

l o a d i n g . . .

ruby dust
#

Yeah... Just wait

#

Discord sucks

earnest phoenix
surreal kiln
earnest phoenix
#

stop

silent flower
pallid zinc
#

Showing err at ctx.font = applyText(canvas, `${member.displayName}!`);

Err = 'applyText' is not define

earnest phoenix
#

How many lines of words can I have in an embed field value?

wraith cipher
#

You can have 1024 characters ig

earnest phoenix
#

@pallid zinc read the error

#

No @wraith cipher

#

356 characters @earnest phoenix

#

or something like that

#

In description you can have 1024

pallid zinc
#

It not that

modern sable
#

256 probably

earnest phoenix
#

Yep

pallid zinc
#

I installed wrong module

#

That why it is showing that

earnest phoenix
#

@pallid zinc use canvas-constructor is easy

pallid zinc
#

I use canvas

earnest phoenix
#

Okay

#

canvas-constructor is better than canvas

#

Canvas constructor works as an embed

#

like .addText('').. Image.. Ext

pallid zinc
#

Sound easy

earnest phoenix
#

Yeah its very easy

#

You can change text font or text color by
.setTextColor(), .setTextFont()

pallid zinc
#

Hmm

#

I will try

#

I use canvas@next

earnest phoenix
#

i started using glitch

#

everything is fine

#

but it doesnt write to json

#

yup

#

i updates it when it starts

#

i think you cant

#

but while its working i may not write anything on it

#

it worked once

#

i changed a value and it changed in file at the same time

pallid zinc
#

@earnest phoenix thanks for help sorry I forget to say before

earnest phoenix
#

Docs

#

do i need to restart my app on glitch every 12 hours ?

spring ember
#

No but you need to wake it up

pallid zinc
#

Use uptime robot

#

But you have to refresh it after you add some new commands @earnest phoenix

spring ember
#

It doesn't matter though, in the end it will be offline

#

You have a limit of hours per month on glitch

earnest phoenix
#

@pallid zinc n0

#

Np

#

Is there a way to sort JSON files values so it will compare to each other and sort in a descending format?

cursive dagger
#

Language?

earnest phoenix
#

js