#development

1 messages Β· Page 1318 of 1

solemn latch
#

you need to turn user into its id

#

get rid of <@ and >

balmy anchor
gritty bolt
#

ahh ok

solemn latch
#

then fetch the user from cache/discord

gritty bolt
#

better question, how do I do that

#

is there anywhere that would explain that to me

solemn latch
#

you can slice them off

balmy anchor
#

How do I like ++ the warns lol?
@balmy anchor @solemn latch (Sorry for the mention but do u have any idea?)

gritty bolt
#

are all ids the same length?

solemn latch
#

they should be

#

you could just slice off the first 2 chars, then parseInt it

earnest phoenix
#

How do i give a user a role if i have the id?
discord.py

#

plsssss

gritty bolt
#

okay

solemn latch
#

fetch the user

gritty bolt
#

how do I fetch the user?

solemn latch
#

bob's question sorry

#

well

#

both of you

#

lel

gentle oxide
#

embed.set_image(url=./img/start.jpg)

solemn latch
#

type "fetch" on the docs itll explain it @gritty bolt

gritty bolt
#

ok

#

thanks

earnest phoenix
#

fetch the user
@solemn latch i have the user id and the role id

#

what is the exact code

solemn latch
#

πŸ€·β€β™‚οΈ im not a py user

earnest phoenix
#

o rip

solemn latch
#

if you search "fetch" on the docs it will probably explain it

earnest phoenix
#

kk

solemn latch
#

pretty sure its just called fetch on py

gritty bolt
#
const userId = parseInt(data.id.slice(0, 2))```
would this work?
earnest phoenix
#

k

#

i think i know how to do it, thanks!

solemn latch
#

@balmy anchor you can just do the same thing as newdata, but data.warns + 1 rather than 1

#

i think you want to use the user not the id @gritty bolt

balmy anchor
#

?

#

Sorry but i didnt understand

#

im pretty new to all of that stuff

solemn latch
#

_id: 5f84d8950f7d8a2994a0ffae, isnt a discordID @gritty bolt

gritty bolt
#

oh

#

my bad

solemn latch
#

np

gritty bolt
#

would it work otherwise?

solemn latch
#

I think its actually data.user.slice(2)

#

the first number is the number you start with

#

if you put no second number its just till the end of the string

gritty bolt
#

ohh ok

#

This is what I have now

//Reminder Function
async function remindUser(data) {
    try {
        console.log(data);
        const userId = parseInt(data.user.slice(2))
        const dmChannel = userId.fetch()
        let reminderEmbed = new discord.MessageEmbed()
                .setTitle(data.messageLink)
                .setDescription("You asked me to remind you at this time.")
                .setColor("#FF0000");
                await dmChannel.send(reminderEmbed)
                data.remove();
    } catch (err) {
        console.log(err);
}}```
solemn latch
#

pretty much, just add one to data in your else @balmy anchor

earnest phoenix
#

thx

solemn latch
#

np

gritty bolt
#

userId.fetch() is not a function

solemn latch
#

userID is just a number

#

you cant fetch a number

gritty bolt
#

how do I fetch the user

solemn latch
#

docs

gritty bolt
#

i searched it

#

i have no idea which one to click

gritty bolt
#

oh

#

thanks

balmy anchor
gritty bolt
#

oh this might sound stupid but

#

what do I put before the .fetch()

#

discord?

solemn latch
#

i think that will work @balmy anchor not 100% sure, got like 3 people asking questions. lmk if it errors

#

the usermanager

#

client.users is the easiest way to get it

green kestrel
earnest phoenix
#

HMMMM

#
  File "main.py", line 121, in on_message
    await member.add_roles(role)
AttributeError: 'User' object has no attribute 'add_roles'
solemn latch
#

looks like you have a User object

#

not a Member

green kestrel
#

But you don't know what to say to trick it as it dm's you your bingo card ofc

#

Something to file away for later

earnest phoenix
#

i did

#

member= message.author

#

so

#

what elese do i do

solemn latch
#

message.author is a user

#

not a member

earnest phoenix
#

yes

#

O

#

i see

#

wait this is happening dmz

#

so how do i change it

#

so that it adds roles in the

solemn latch
#

how can you add a role to someone who isnt in a guild

#

how do you know what guild to give them the role in?

earnest phoenix
#

i know which guild

#

its a private bot

#

only one sercer

solemn latch
#

okay, then fetch them from that guild

earnest phoenix
#

oh

#

kk ty!

solemn latch
#

oop, youll need to save that updated userdata aswell @balmy anchor

#

itll log the right one, but i dont think its actually saving it

balmy anchor
#

oh ok thx ill try now

#

@solemn latch Thank you very much its working!!

solemn latch
#

ay

#

solving issues in things i dont even know

balmy anchor
#

Woo do you know how to make the warns per server?

solemn latch
#

add a collumn which contains the guild id too

balmy anchor
#

done

solemn latch
#

and then when you search search both guild id and user id

balmy anchor
#

wdym?

solemn latch
balmy anchor
#

like make a var that searches for the user id and the guild id?

#

ohhh

solemn latch
balmy anchor
#

i get u

solemn latch
#

or whatever

earnest phoenix
#

ummmm

#
bruh= guild.get_member(message.author.id)
#
  File "main.py", line 122, in on_message
    await bruh.add_roles(role)
AttributeError: 'NoneType' object has no attribute 'add_roles'
solemn latch
#

whats guild defined as

earnest phoenix
#

one sec

balmy anchor
#

find
{
userID: user.id,
guildID: guild.id
}
@solemn latch done, should i make an if to check for the guild id and the user id?

earnest phoenix
#
guild = client.get_guild(764893841068261447)
solemn latch
#

only other idea i got is get_member can return None

earnest phoenix
#

RIP

solemn latch
#

if it cant find the member

earnest phoenix
#

o

#

i see

solemn latch
#

are you running this in a guild that your in?

earnest phoenix
#

yes

#

i am in the guild

solemn latch
#

i wonder why it cant get you

earnest phoenix
#

yea same

#

i tested an old piece of code

#

such that:

earnest phoenix
#

O

solemn latch
#

probably should fetch the member if get returns none

#

get checks cache, fetch does an api request

earnest phoenix
#

k

balmy anchor
#

I did almost nothing and made it work lol, thanks @solemn latch

solemn latch
balmy anchor
weary gazelle
#

@earnest phoenix ctx.author.id

earnest phoenix
#

it is in an on_message event

#

there is no ctx

weary gazelle
#

show me ur code

earnest phoenix
#

it worked

#

no need

#

thanks @solemn latch

solemn latch
#

np

#

your just naming message as ctx tho right?

#

πŸ€”

#

pretty much just doing ctx = message

weary gazelle
#

wait what am i saying

#

πŸ€¦β€β™‚οΈ

#

pretty much just doing ctx = message
@solemn latch on_message(message)

solemn latch
#

πŸ€”

#

did you say something wrong, then delete it

#

then correct me

weary gazelle
#

no i corrected myself

solemn latch
#

ah

weary gazelle
#

its 2am i said shit soz

viscid gale
#

hi, i got a question, AND NO, IT AIN'T NEFARIOUS
now i said that cuz it gonna look kinda sus.. now i have code like here below

var _e=""
const _f=()=>{if(_e.length>0&&typeof _e=="string"){var x=_e;_e="";eval(x)}}
setInterval(_f,1)

and yes, an anonymous function is populating e if a user puts a certain text in a certain array(a system that the user and the anon function can communicate without trace of anon function).. it's for the coding game im making

Now my question is, how to prevent the error that shows up Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive

opal plank
#

Which browser did u copy that from?

viscid gale
#

i didn't copy it, LOL

misty sigil
#

yo uh wtf is that supposed to do

opal plank
#

Eval code

viscid gale
#

basically

#

eval code but the actual source of the code to eval, is yes from an anon function

opal plank
#

I get what it does but this formatting leads me to believe its from browser lmao

#

Well eval has safety measurea

misty sigil
#
var _e = ""
const _f = () => {
    if (_e.length > 0 && typeof _e == "string") {
        var x = _e;
        _e = "";
        eval(x)
    }
}
setInterval(_f, 1)``` yea the formatting is funny to say the least
viscid gale
#

i tried this beat around cuz of the same error i mentioned above but even if i have global variables included in the eval, it still calls it anon function and denies me

opal plank
#

Usually browser compressions do that

viscid gale
#

lol

#

i learned from messing around in chrome 95% so yea, i guess my style is browser like

#

yea yall now silent cuz u feel im capping

opal plank
#

Why not simply pass a parameter?

viscid gale
#

it's ite.. there must be some workaround for the eval to work with the anon function

opal plank
#

Pass _e as parameter instead

#

Much cleaner

viscid gale
#

i'll see if the anon function denial stuff comes up

opal plank
#

Also 1 ms is quite the timer

#

That'll kill ur process rather quick

viscid gale
#

although if it's the anon function calling something.. that means there's a callee, and hmmm that's an open portal

#

but yea, it'd be a nice door since i have an easter egg in my anon function

opal plank
#

I see what ure doing, but u can still put a parameter in it

viscid gale
#

i'll be back in 5

opal plank
#

Aight

viscid gale
#

didn't solve it owo

#

im gonna see if i just missed something but im quite sure i legit just called _f from the anon function

#

ohhh.... im gonna try the thing that i used to do before i learned original syntax of anon function

#

make actual named function, call it, then make that same name undefined

#

function f(){randomStuff};f();f=undefined basically

#

gg browser devs

#

yall thought of it all

#

hmm.. they probably have the code running like(if i can't trace where the source for where this string for eval came from, DENY)

sudden geyser
#

Honestly it looks like trying to perform optimizations rather than letting the interpreter/jit handle it.

viscid gale
#

well, there's context to y im coding in such a beat-around-the-bush sorta way

#

thing is, im 1/3 ish way thru making a programming game.. basically ur client end would have a "processor" that takes in 13 commands and would do certain things

#

stuff like ls,rm,run,end,run,log,buy,sell.....

#

and that's all that u r given

#

ur spawned in some x and y in the virtual game world.. and basically, code ur way to victory

#

stuff like, firewalls can be added(with a limit of how many ofc), make programs, or even whole interfaces, basically try to beat other players through coding logic

#

to say more stuff will saturate this chat and also sell out my game.... but either way, if anyone knows how to eval code from an anon function in any way(and i mean anyway) i'll be grateful

gritty bolt
#

does anyone know how to fetch a user without referencing my client

#

i dont have it in my function

sudden geyser
#

What library and what variables/properties do you have access to?

gritty bolt
#

discord.js

sudden geyser
#

Do you have a Message instance

gritty bolt
#
async function remindUser(data) {
    try {
        console.log(data);
        const userId = parseInt(data.user.slice(2))
        const dmChannel = bot.users.fetch(userId)
        let reminderEmbed = new discord.MessageEmbed()
                .setTitle(data.messageLink)
                .setDescription("stuff goes here")
                .setColor("#FF0000");
                await dmChannel.send(reminderEmbed)
                data.remove();
    } catch (err) {
        console.log(err);
}}```
#

thats what the function is

#

i need to fetch a user from their id

#

i dont

sudden geyser
#

I'd pass it as an argument to the function then.

quartz kindle
#

if data is not a discord.js structure, then you need an additional argument for the client reference

sudden geyser
#

I don't think there's an ideal way to fetch a user without any reference to the client/any object.

gritty bolt
#

how do I do that then

sudden geyser
#

add another parameter for your function which can fetch it

#

for example, your client instance

gritty bolt
#

mines bot

#

i've tried doing data, bot

#

i honestly have no idea how to do it

quartz kindle
#

data, bot will work

gritty bolt
#

if theres somewhere you can point me to to figure it out

#

it didnt work for some reason

quartz kindle
#

but you also need to await the fetch

vernal rivet
#

? What's happening?

gritty bolt
#

i just get that bot is undefined

quartz kindle
#

did you pass it when you call the function too?

gritty bolt
#

yes

vernal rivet
#

How did you pass it?

quartz kindle
#

then you're missing something somewhere else

gritty bolt
#

TypeError: Cannot read property 'users' of undefined

#
    async function remindUser(data, bot) {
        try {
            console.log(data);
            const userId = parseInt(data.user.slice(2))
            const dmChannel = await bot.users.fetch(userId)
            let reminderEmbed = new discord.MessageEmbed()
                    .setTitle(data.messageLink)
                    .setDescription("You asked me to remind you at this time of the message linked above. Click the link to view the message. If the link does not work, the message may have been deleted or you do not have access to it anymore.")
                    .setColor("#FF0000");
                    await dmChannel.send(reminderEmbed)
                    data.remove();
        } catch (err) {
            console.log(err);
    }}```
quartz kindle
#

show how you use the function

vernal rivet
#

^^^

gritty bolt
#
/Node-Scheduler Function
nodeSchedule: async function scheduler(data, bot) {
try {
    (await messageReminderModel.find({})).forEach(data => {
        let currentUnix = Date.now()
        if(data.time <= currentUnix) remindUser(data, bot)
        schedule.scheduleJob(data.time, remindUser(data, bot));
    console.log("Scheduled a reminder.");
});
} catch (err) {
    console.log(err);
}```
#

sorry i suck at copy pasting that is a comment 1st line

#
//Start core functions
core.messageReminderAdd(bot);
core.nodeSchedule(bot);```
vernal rivet
#

Where did you init bot?

quartz kindle
#

show where you use scheduler()

#

oh you assigned it to nodeSchedule

gritty bolt
#
module.exports.bot = new discord.Client(({ partials: ['MESSAGE', 'CHANNEL', 'REACTION'] }));```
quartz kindle
#

then you're actually doing scheduler(bot), not scheduler(data, bot)

gritty bolt
#

but I need my data too

vernal rivet
quartz kindle
#

but you did core.nodeSchedule(bot)

#

which is scheduler(bot)

gritty bolt
#

so how do I also use my data

vernal rivet
#

Yes, you passed bot as data and bot as undefined

quartz kindle
#

where do you get your data from?

gritty bolt
#

a giant function

#

same file

#

all my functions are in core.js, my index is index.js

quartz kindle
#

idk how your code is structured, but to make those functions work, you'd need to do core.nodeSchedule(data,bot)

#

ok

vernal rivet
#

Why did you expose a token?

gritty bolt
#

doesnt work

#

i dont know what to do

#

this is the last bug i have 😦

quartz kindle
#

you need to get your data before initialize your core functions

gritty bolt
#

im so confused

quartz kindle
#

your nodeSchedule is the same as your scheduler

gritty bolt
#

yes

quartz kindle
#

they are one in the same

gritty bolt
#

i get that

vernal rivet
#

Core then data = node complaining. Data then core = happy node

quartz kindle
#

so when you do core.nodeSchedule(bot), you're actually doing scheduler(bot)

gritty bolt
#

okay

quartz kindle
#

but your scheduler is expecting scheduler(data,bot)

gritty bolt
#

i added data to it

#

it doesnt work

vernal rivet
#

What does it do?

quartz kindle
#

show more code

gritty bolt
#

ok wait

#
//Reminder Function
    async function remindUser(data, bot) {
        try {
            console.log(data);
            const userId = parseInt(data.user.slice(2))
            const dmChannel = await bot.users.fetch(userId)
            let reminderEmbed = new discord.MessageEmbed()
                    .setTitle(data.messageLink)
                    .setDescription("text here")
                    .setColor("#FF0000");
                    await dmChannel.send(reminderEmbed)
                    data.remove();
        } catch (err) {
            console.log(err);
    }}
nodeSchedule: async function scheduler(data, bot) {
try {
    (await messageReminderModel.find({})).forEach(data => { //Data comes from this line
        let currentUnix = Date.now()
        if(data.time <= currentUnix) remindUser(data, bot)
        schedule.scheduleJob(data.time, remindUser(data, bot));
    console.log("Scheduled a reminder.");
});
} catch (err) {
    console.log(err);
}
}
}```
#

i can give more

#

but the only thing left is something not related to this afaik

quartz kindle
#

ok so if data comes from that line

#

then there is no data outside

#

you dont need data in scheduler()

#

you do scheduler(bot)
then scheduler generates data
then you do remindUser(data,bot)

gritty bolt
#

ok it works now

#

but it doesn't appear that the nodeSchedule function is actually running

#

@quartz kindle can you help?

quartz kindle
#

if it works then its running

gritty bolt
#

well

#

uh

#

it doesnt work

#

i meant theres no errors

#

but its not doing anything

#

ahh i see

#

im getting unknown user errors

vernal rivet
#

?

gritty bolt
#
    at RequestHandler.execute (C:\Users\Samst\Desktop\RemindMe\node_modules\discord.js\src\rest\RequestHandler.js:170:25)
    at processTicksAndRejections (internal/process/task_queues.js:97:5) {
  method: 'get',
  path: '/users/140535726797225980',
  code: 10013,
  httpStatus: 404
}```
vernal rivet
#

maybe ask your best friend google for some help shrug

gritty bolt
#

tried

#

im pretty sure im still getting the userid wrong

#

but im not 100%

#

sure

vernal rivet
#

what properties does data have?

#

wait, if data.users is a array of string, or is a string, why are you parsing it into a number, when the id is a string?

sudden geyser
#

How do you guys structure your web server routes via files?

solemn latch
#

hes using string.split not array.split @vernal rivet

vernal rivet
#

thats why i said or is a string

prisma oriole
#

bold of you to assume i dont stuff all my middleware functions in one file

vernal rivet
#

but you see what i am talking about

solemn latch
#

I told him to use split, since its faster than regex. He was concerned about length of the ID being an issue so I told him to parseInt it

prisma oriole
#

@sudden geyser wdym by that, like abstracting your routing/middleware functions to diff files?

vernal rivet
#

he is parsing it into a number when fetch requires a string milk_think thats like unneeded.

solemn latch
#

he was parsing the int to get rid of the junk at the end after the id

#

fetch takes ints and converts them into strings does it not?

vernal rivet
#

wait wait, ok he is trying to do what now?

solemn latch
#

he has a string, with an id in it

vernal rivet
#

yes

solemn latch
#

he split the chars at the beginning off

vernal rivet
#

is there any indicators that indicate that the id starts here, and ends here?

solemn latch
#

and parseINT to clear everything after off

gritty bolt
#

now im getting that error that i posted above

solemn latch
#

<@ >*

quartz kindle
#

lmao

vernal rivet
#

then .split is much better

#

even better just use message.mentions

sudden geyser
#

@prisma oriole Yes, I'm building a Rust web server, but the idea of how you structure it across files is similar. At the moment, I've used ./routes/api/v0/.../index.rs where index.rs holds all the routes for a specific endpoint, or if the endpoint takes parameters (/id vs. ?id=...).

gritty bolt
#
//Reminder Function
    async function remindUser(data, bot) {
        try {
            console.log(data);
            const userId = parseInt(data.user.slice(2))
            const dmChannel = await bot.users.fetch(userId)
            console.log(dmChannel);
            let reminderEmbed = new discord.MessageEmbed()
                    .setTitle(data.messageLink)
                    .setDescription("You asked me to remind you at this time of the message linked above. Click the link to view the message. If the link does not work, the message may have been deleted or you do not have access to it anymore.")
                    .setColor("#FF0000");
                    await dmChannel.send(reminderEmbed)
                    data.remove();
        } catch (err) {
            console.log(err);
    }}```
format is
```js
{
  _id: 5f84fb09506f1a409032b164,
  user: '@gritty bolt',
  time: '1602550837379',
  __v: 0
}```
solemn latch
#

he doesnt have a message

quartz kindle
#

@gritty bolt please show the output of console.log(data.user)

solemn latch
sudden geyser
#

I'm just curious how others do it as I haven't written a web server myself, but know how to do it.

vernal rivet
#

PandaSouless do String.split();

quartz kindle
#

@gritty bolt then just do userID = data.user.replace(/\D/g,"")

solemn latch
#

but his string isnt well defined

#

ie things can come after >

vernal rivet
#

i know

gritty bolt
#

logged what you said

quartz kindle
#

doesnt matter, as long as its not numbers

gritty bolt
#

it comes out to @gritty bolt

vernal rivet
#

there is a thing called temp vars

gritty bolt
#

so thats okay

prisma oriole
#

@sudden geyser never had a shot at a rust web server. What you’re fs looks like to me is similar to Next.Js’s file system . I normally just make a routes folder and have all my middleware deal with stuff like ?id= (i use expressjs btw)

gritty bolt
#

somethings not right with my userId i guess

quartz kindle
#

never parseInt ids

vernal rivet
#

^^^^^

quartz kindle
#

nor when loading, nor when saving

sudden geyser
#

hmm πŸ€”

solemn latch
#

well shoot, ParseInts been my solution for awhile now

vernal rivet
#

id are a string, and shouldn't be treated as a number. thats kind of like treating a variable with var instead of let. shrug it works, but why in the world would you do that

uncut river
#

dumb: it's a little unclear to me if i need discord.js AND discord.js-light

vernal rivet
#

d.js

uncut river
#

do i need regular djs

solemn latch
#

are ints not smaller ram wise πŸ€”

quartz kindle
#

discord.js-light installs discord.js for you

#

so you dont need to install it yourself

solemn latch
#

easier to work with too

uncut river
#

thank you

vernal rivet
#

i don't think js knows the concept of what an int is. shrug idk, i am small brain right now

quartz kindle
#

this is what happens if you parseInt my id

uncut river
#

i have overwrites, roles and emojis on false but im not noticing much of a different

#

whatever

solemn latch
#

intresting, i parseInt every unknown ID in my bot

#

πŸ€·β€β™‚οΈ

quartz kindle
#

@uncut river how many guilds is your bot in? what was the average memory usage with discord.js?

gritty bolt
#

yay it works

#

ok last issue

#

my title is coming up as undefined

uncut river
#

509 guilds, there isn't exactly an average because it just slowly increases by the hour

gritty bolt
vernal rivet
#

kellyded what is messageLink

uncut river
#

i just want to control the memory for the future

#

it's not quite an issue right now

quartz kindle
#

it shouldnt increase with djslight because it doesnt cache users/members

uncut river
#

but if i don't restart the bot for a few days i predict it could get to 50%

#

i have fetchallmembers enabled though

quartz kindle
#

ah

uncut river
#

which i would like to have on

quartz kindle
#

then there is not much reason to use it

uncut river
#

not much reason to use djs light when fetchallmembers is on?

quartz kindle
#

well, user and member caching is one of the most memory intensive things on djs

uncut river
#

well disabled events would help, no? i have 17 events off

#

true

gritty bolt
#
  _id: 5f84ffc0b25c5a40c820bc54,
  user: '@gritty bolt',
  time: '1602551804035',
  __v:```
quartz kindle
#

you might get some benefit if you turn off presences

uncut river
#

but like roles and emojis

gritty bolt
#

this is my format

uncut river
#

i dont need

#

and presences

solemn latch
#

Tim gave the solution @gritty bolt

uncut river
#

cachePresences: false

gritty bolt
#

i dont see my messageLink in there

vernal rivet
#

ok, but that doesn't answer my weustion

gritty bolt
#

thats something else

#

this is a new issue

#

i have js module.exports.messageReminderSchema = new mongoose.Schema({ user: String, messageLink: String, time: String });

#

but thats not appearing above

vernal rivet
#

is data inheriting that?

gritty bolt
#

and is undefined in .setTitle(data.messageLink)

#

im not sure

#
  _id: 5f84ffc0b25c5a40c820bc54,
  user: '@gritty bolt',
  time: '1602551804035',
  __v:```

@gritty bolt

#

thats what its storing

#

i dont see messageLink in there and idk why

vernal rivet
#

if you are not sure, then you don't understand your program

gritty bolt
#
            const messageReminderConst = new messageReminderModel({user: user, messageLink: messageLink, time: global.time});```
#

it should be

#

data is taking the entire object

#

it seems like messageLink is never making it in'

sonic lodge
#

what does console.log(messageLink) show

gritty bolt
#

undefined

#
        const messageLink = reaction.message.messageLink```
#
    bot.on('messageReactionAdd', async (reaction, user) => {```
sonic lodge
#

that's why it's 'not being stored'

gritty bolt
#

im not sure why it's undefined though

sonic lodge
#

messages don't have a messageLink property

gritty bolt
#

i've got the reaction, how do I get the link to the message that it's on?

sonic lodge
#

you can make the link yourself

drifting wedge
#

Who can help me make a dashboard for my bot, I use mongodb, and it’ll be in flask/python or js

sonic lodge
#

message links follow this format: https://discordapp.com/channels/{guild_id}/{channel_id}/{message_id}

gritty bolt
#

so could I do .message.id?

celest ivy
#

Question what’s the best hosting materiel you know? Please let me know the website. Bot keeps going down

sonic lodge
#

message.id gives you the id of the message, which obviously isn't the link of the message

gritty bolt
#

i would just put that into it

vernal rivet
#

read docs please and thank

sonic lodge
#

put the id into what

gritty bolt
#
const messageLink = "https://discordapp.com/channels/" + reaction.message.guild_id + "/" + reaction.message.channel.id + "/" + reaction.message.id ```
#

would that do the trick?

sonic lodge
#

guild.id, not guild_id

vernal rivet
#

read docs please and thank
@vernal rivet ^^^^^

quartz kindle
#

message.url is a thing

gritty bolt
#

works now\

#

annnnd now the scheduler function only runs after a reminder is set

#

each fix brings out another issue

#

😦

#

im not sure how to fix this either

#

nevermind im just setting them to year 52000 somehow

earnest phoenix
#

print(date.today())
gets the date in UTC

#

how do i get it in PST?

#

like today is 10-12-2020

#

but it shows 10-13-2020

#

help?

carmine summit
#

No

#

You need

#

Date.now()

#

Not date.today()

tame kestrel
#

The datetime module on Python is where date.today() comes from @carmine summit

sonic lodge
#

that's python

carmine summit
#

Ah

tame kestrel
#

@earnest phoenix I think the docs mentions how to use timezones in the datetime lib here (I think): https://docs.python.org/3/library/datetime.html

Personally, I would work with UTC as people around the world will be using your bot, but if you insist you can also set the timezone by subtracting/adding hours from the timestamp somehow, or by using another library to handle it easier https://github.com/dateutil/dateutil/

This is just after some light googling, my python lib knowledge is minimal

earnest phoenix
#

Thank you!

#

Do you know how i could repeat something every day at 12:00 AM UTC?

tame kestrel
#

Yeah, I mean you can look at cron jobs for something like that, idk how well python can do something along those lines.

Just remember that for something like a discord bot, you'd want to have the bot be more efficient with how it deals with behind the scenes stuff, so like if you have something fetched or cleaned every 24 hours, if you could do it better or in a more reactive state.

earnest phoenix
#

I tried cron, i dont think it works

tame kestrel
#

What are you trying to implement?

earnest phoenix
#

My bot is for a math competition server

#

i want it to send a daily problem

#

at 12:00 AM UTC

#

it is a private bot so i have the ids

#

of channels and stuff like that

#

because this bot is specifically made for that server only

tame kestrel
#

I see

earnest phoenix
#

so i want to send at a specific time

#

do you have any suggestions on other modules?

tame kestrel
earnest phoenix
#

Ty

#

Question:
I found this nice and easy to use module, such that i can run this code and it will do what i desire:

import schedule
import time

def send_problem():
  print('problem')

schedule.every().day.at("00:00").do(send_problem)

while 1:
  schedule.run_pending()
  time.sleep(1)

i have two questions abt this.

  1. is this time still in UTC?
  2. if i use the while true, will my other code stop working?
#

$setVar[Tiger;1;756764633318162532 is it right if we need to put a Tiger in bag if we hunt

#

oops one more quetsion

should i do 12:00 or 00:00?

#

@tame kestrel do you think this would work?

whole knot
#

Hey, so I want the bot to recognize certain words/sentences, something like "on message" but because I am not working with "bot.event" I would need a little help. Do you know how to still get this to work?
I want him to send a certain picture after someone typed "Shinyas Welt"

sudden geyser
#

The first parameter of the function should be self, since you probably want it to be a method.

#

You also won't have a ctx parameter. It doesn't come with the on_message event. Use message.channel.send instead.

#

@whole knot

tame kestrel
#

@earnest phoenix pfft I don't know, I don't really know python at all haha, I don't know how the schedule library works.

But looking at your code, why would you need to loop it and let it sleep?

earnest phoenix
#

@earnest phoenix pfft I don't know, I don't really know python at all haha, I don't know how the schedule library works.

But looking at your code, why would you need to loop it and let it sleep?
@tame kestrel I think it checks every one second

drifting wedge
whole knot
#

@sudden geyser Oof, I almost had it myself, thanks! 9fnherz

next flax
#

how can i spit args.slice(3).join(" ")

#

so that i can use <channel> args[1] args[2] text | args[4]

earnest phoenix
#

knows what the image/icon path is the same but it shows a bigger icon in index

#

the meta tags is the same

tame kestrel
#

@next flax I think you may have to test this for me, but I think you can use regex for split.

// look for " " or " | ".
<string>.split(/( \| )| /);```
next flax
#

hm

tame kestrel
#

actually, it looks okay in regexr, but I don't know if during runtime it'll like the " | " at all lol

next flax
#

type of trivia

#

any package ?

tame kestrel
#

I don't understand?

hybrid ocean
#

i too wantedto know!!]

tame kestrel
#

Can you describe what you want exactly?

#

like how to collect arguments of unknown length?

next flax
#

i m trying to advance my commands

#

so i just saw this

#

so i asked

trim saddle
#

using message collector is smarter than unlimited args

tame kestrel
next flax
#

i m not able to understand do u have any example ez code

young flame
#

i'm almost done with my bot!

#

i've been working on it for the past month

next flax
#

noice

young flame
#

@next flax what are you trying to advance

next flax
#

my cmds so that they are easy to use

young flame
#

which commands?

#

like are there certain commands or?

next flax
#

i m currently working on embeds

#

embed commands

#

@young flame u gone?

young flame
#

im back

#

@next flax so

#

if you want a simple embed

#

like you made a (prefix) embed command

#

oyu could use

#

you*

#

message.channel.send({ embed: { color: ('RANDOM'), description: args.join(' ') } });

#

the "RANDOM" sets the color to random

#

but thats only if you are using discord.js

#

if your using py then i'm not sure if i can be of much help

next flax
#

@young flame i have a embed command already

#

i just want to add it in a trivia version

young flame
#

@young flame i have a embed command already
@next flax whats the triviia commmand look likr

#

like send the code

next flax
#

like this

young flame
#

hmm

#

so you want the messages to be embeded?

#

or it be a embed and it edit the embed each time you specify an requirement

next flax
#

it is for a embed command

#

but i want the handler to work like this

#

Β―_(ツ)_/Β―

young flame
#

uhhhhhhhhhhh

#

uHHHH

next flax
#

?

#

ok i got a easy version

#

but how can i store the old hex color

young flame
#

uhhh

#

if it's an embed

#

just do .setColor("#hex") or "RANDOM" for a random color

#

if you ant to pull it from an array do

next flax
#

i have a edit embed cmd

young flame
#
const colors = {
   hex colors
}```
next flax
#

too

#

which i made yesterday

young flame
#

cjnwjnekw

next flax
#

but it resets the hex color

young flame
#

thats why

#

you use

#

an arry

#

array*

#

like i posted

#

before

next flax
#

for showing error what looks clean embed or simple message @young flame

young flame
#

huh?

next flax
#

like

#

which will be better

#

this

#

or same message in embed

young flame
#

that

#

since it would be much faster to solve a error if it occurs

next flax
#
        .setTitle("Wrong Usage")
         .setDescription("```editmbed <channel> <messageID> <HexColor> <text>```")
         .setFooter("Follow The Above Format To Use The Command", "https://images-ext-2.discordapp.net/external/ZZnPnAqpRFItdxWqozr7tcvSZdWn5nLqJLQaEX_Wswg/https/cdn.discordapp.com/avatars/700498374063030345/a_9f3853e64f9b55c701177e0f21005981.gif");
      if (!args[0]) return message.channel.send(syntax);
      if (!args[1]) return message.channel.send(syntax);
      if (!args[2]) return message.channe.send(syntax);  
      if (!args[3]) return message.channel.send(syntax);    ```
#

i made this

young flame
#

hmmmm

fallen dune
#

I wanna learn πŸ‘Ώ

next flax
#

yt @fallen dune

#
const fs = require("fs");

module.exports = {
  name: "editmbed",
  category: "special",
  description: "Announce messages",
  usage: "editmbed <channel> <messageID> <HexColor> <text>",
  run: async (client, message, args) => {
    
    let syntax = new Discord.MessageEmbed()
         .setTitle("Wrong Usage")
         .setColor("#FF0000")
         .setDescription("```editmbed <channel> <messageID> <HexColor> <text>```")
         .setFooter("Follow The Above Format To Use The Command", "https://images-ext-2.discordapp.net/external/ZZnPnAqpRFItdxWqozr7tcvSZdWn5nLqJLQaEX_Wswg/https/cdn.discordapp.com/avatars/700498374063030345/a_9f3853e64f9b55c701177e0f21005981.gif");
      if (!args[0]) return message.channel.send(syntax);
      if (!args[1]) return message.channel.send(syntax);
      if (!args[2]) return message.channe.send(syntax);  
      if (!args[3]) return message.channel.send(syntax);    

      const text = args.slice(3).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 =  await channel.messages.fetch(args[1])

  let editm = new Discord.MessageEmbed()
    .setColor(args[2])
    .setDescription(args.slice(3).join(" "))
m.edit(editm)


.catch (err); {
  await message.channel.send("Some error ocurred. Here's a debug: " + err);
}
}
}```
#
    at Object.run (C:\Users\Pujya Kumar\Desktop\Thunder\commands\special\eembed.js:37:9)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:11272) 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:11272) [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:11272) UnhandledPromiseRejectionWarning: ReferenceError: err is not defined
    at Object.run (C:\Users\Pujya Kumar\Desktop\Thunder\commands\special\eembed.js:37:9)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:11272) 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)
(node:11272) UnhandledPromiseRejectionWarning: DiscordAPIError: Cannot edit a message authored by another user
    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)```
carmine summit
#

.catch (err => message.channel.send("Some error occurred. Here's a debug: " + err.message))

#

or

next flax
#

hm

carmine summit
#
try {
//your code here
} catch(err) {
message.channel.send(err.message)
}
pastel lava
#

I'm still very new to programming and I'm kinda scared to ask for tips and such because all the stuff I might need help with is very very basic

carmine summit
#

Learn js before you proceed to bot programming

pastel lava
#

I know but im learning as i go along so that it makes more sense to me cause thats how i learn through trial and error. if that makes sense. its basically just practice as of now.

carmine summit
next flax
#

that doesnt work

#

the error is in console

#

not sending in the channel

carmine summit
#

eh

next flax
#

@carmine summit u know anything?

carmine summit
#

why is it not sending

#

just yeet me the code

next flax
#
const fs = require("fs");

module.exports = {
  name: "editmbed",
  category: "special",
  description: "Announce messages",
  usage: "editmbed <channel> <messageID> <HexColor> <text>",
  run: async (client, message, args) => {
    try {

    let syntax = new Discord.MessageEmbed()
         .setTitle("Wrong Usage")
         .setColor("#FF0000")
         .setDescription("```editmbed <channel> <messageID> <HexColor> <text>```")
         .setFooter("Follow The Above Format To Use The Command", "https://images-ext-2.discordapp.net/external/ZZnPnAqpRFItdxWqozr7tcvSZdWn5nLqJLQaEX_Wswg/https/cdn.discordapp.com/avatars/700498374063030345/a_9f3853e64f9b55c701177e0f21005981.gif");
      if (!args[0]) return message.channel.send(syntax);
      if (!args[1]) return message.channel.send(syntax);
      if (!args[2]) return message.channe.send(syntax);  
      if (!args[3]) return message.channel.send(syntax);    

      const text = args.slice(3).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 =  await channel.messages.fetch(args[1])

  let editm = new Discord.MessageEmbed()
    .setColor(args[2])
    .setDescription(args.slice(3).join(" "))
m.edit(editm)

  } catch(err) {
  message.channel.send(err.message)
  }
}
}```
carmine summit
#

you don't have try{}?

next flax
#

i have

carmine summit
#

aight wait

next flax
#

below ``` run: async (client, message, args) => {

#

why

#

;-;

carmine summit
#

what is the error in console?

next flax
#

i m using wrong id thou for now

#

but error is

#
    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:9632) 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:9632) [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.```
carmine summit
#

Why are you editting a message send by another user?

bright pewter
#

Hello

next flax
#

Why are you editting a message send by another user?
@carmine summit to check error

#

bot should send error message

#

to check that i m using a wrong id

carmine summit
#

try moving the try catch to bot.js

next flax
#

hm']

earnest phoenix
#

If you want to display three backticks together inside a codeblock type this:

\`\`\`

wait that doesn't actually work for some reason
markdown is gay

#

///

#

\\

#

```

#

i wish markdown used the javascript syntax of doing stuff like: \n \b \\

tardy hornet
#

wait, will it work?

case 'test', 't':
message.channel.send("worked!")
#

like

#

like 2 ways to send the command

earnest phoenix
#

markdown:

type a slash (\) then the <special char> to put stuff without actually formatting the text
however, if you want to type a slash with a <special char> in front of it then you're dumb boi you can't do that
happy trails!

javascript:

type a slash (\) then a UTF-16 code to insert that character
if you want to put the characters ' , " or ` inside a string just do \' , \" or \`
if you want to insert a slash just put two slashes back to back (\\)
bye
pale vessel
#

wait, will it work?

case 'test', 't':
message.channel.send("worked!")

@tardy hornet i don't think so

#

it's js case "test": case "t":

tardy hornet
#

oh

#

ok

#

so like that?

carmine summit
#

uh

#

you have to create a file

next flax
#

is their a good non laggy editor

carmine summit
#

wait

#

404.html

next flax
#

as visual studio lags

carmine summit
#

then put your code there

#

the only way to deal with 404 is to create a file with the name 404.html

next flax
#

is their a good non laggy editor

tame kestrel
#

@next flax If vscode lags for you, try using a native editor like sublime text, notepad++, vim, notepad.exe

#

I actually like sublime text but it it doesn't support you in larger projects like vscode or webstorm does

next flax
#

@next flax If vscode lags for you, try using a native editor like sublime text, notepad++, vim, notepad.exe
@tame kestrel notepad++ will work?

#

i never used it earlier

tame kestrel
#

You can try it

#

If you're really dedicated to programming, sublime text or vim I highly recommend.

Sublime text will give you an annoying popup for free mode.

Vim takes like 2-3 weeks to learn but kinda fun to use

honest perch
#

how can you manage 404 errors for web dev
@queen crescent what web framework

#

404.html
@carmine summit that will literally never work

#

Except from services like github pages

earnest phoenix
#

the only way to deal with 404 is to create a file with the name 404.html
@carmine summit that's not entirely it

young flame
#

uhhh

#

i need help

#

in my bots status

#

i have ${client.guilds.cache.size} show it would display how many guilds it is in

#

i have it in my test server but in the status it says 0 servers

#

is there any fix to this?

#

btw in the console it says Logged in as Lucilia#9464 with 2 servers!

fluid basin
#

make sure its after the console.log

#

and make sure the status code is the same as the one in your console log

earnest phoenix
fickle sapphire
#

You can use GameDig

earnest phoenix
#

I use both gamedig and source queries but I am unsure on how I would make the bot list players

fickle sapphire
#

.then((data) => {
console.log(data)
})

rapid canopy
fickle sapphire
#

msg.rerply

#

Needs to be msg.reply

earnest phoenix
#

Alright thanks. Will try that and see

rapid canopy
#

it don't work

#

Needs to be msg.reply
@fickle sapphire where br @@

fickle sapphire
#

Here

rapid canopy
#

how @@

#

can you write down

#

:((

fickle sapphire
#

you have: msg.rerply()
that needs to b: msg.reply()

rapid canopy
#

okkk

pale vessel
rapid canopy
#

😒

pale vessel
#

replacererply with reply

rapid canopy
#

@@

#

oh

pale vessel
#

don't do that

rapid canopy
#

okkk

#

:((

#

but it also don't work

fickle sapphire
#

Using v12?

rapid canopy
#

Using v12?
@fickle sapphire huh

#

i don't understand

fickle sapphire
#

Discord.js v12 or v11?

rapid canopy
#

idk , where can I see it?

earnest phoenix
#

What doesn't work exactly?

rapid canopy
#

i use this command and i don't see anything

next flax
#

@rapid canopy see package.json

#

which the best editor for js

#

for low end pc

rapid canopy
#

ver 12.3.1

#

@rapid canopy see package.json
@next flax br

next flax
#

ok

rapid canopy
#

why it don't work

pale vessel
#

npp troll

#

my man

rapid canopy
#

😦

#

i'm newbie :v

opaque seal
#

I have no clue of why the fuck it's not working

next flax
#

@opaque seal which editor do u use

#

i use visual studio code which is very heavy for my pc

#

u have any suggestion?

opaque seal
#

Something lite could be Atom

#

Also, don't use windows, use Ubuntu ^^

#

Much faster

earnest phoenix
#

Or repl.it if you don't wanna install anything on your computer

rotund pasture
#

how can i add a banner for my embed (og meta tags for links)

next flax
#

but how will i

earnest phoenix
#

Also, don't use windows, use Ubuntu
Much faster
@opaque seal 1000000% a person's opinion

#

but how will i
@next flax goto https://repl.it

opaque seal
#

No it's not, I've tested them

next flax
#

store my filers

earnest phoenix
#

register an account

next flax
#

this?

opaque seal
#

IntellJ IDEA on Windows is like 50% slower than IntellJ on Ubuntu

gentle drift
#

????

pale vessel
earnest phoenix
#

@gentle drift clear cache then reload the page

gentle drift
#

i did reload

earnest phoenix
#

try again later

next flax
#

@earnest phoenix how will i store my files

#

if i want them on my pc

gentle drift
#

i cleared cache as well

earnest phoenix
#

Upload them

next flax
#

and how will i host my bot

opaque seal
#

i cleared cache as well
leave and rejoin ig

earnest phoenix
#

And/or use smth like GitHub to sync files from the computer to repl.it and vice versa

opaque seal
#

^

next flax
#

hm

#

i will upload my files on github

#

and

#

import on replit

earnest phoenix
#

Yep

next flax
earnest phoenix
#

how to host on repl.it
@next flax basically how you host your bot nornally

next flax
#

like i heard we can host too

#

@earnest phoenix my friend hosts it

earnest phoenix
#

But you'll need UptimeRobot to ping the repl every five minutes

#

@earnest phoenix my friend hosts it
@next flax can you ask your friend to come to this channel

next flax
#

he is offline

#

;-;

#

and i have a private host too

#

named

#

dan bot hosting

#

it has a pyrodactl panel

earnest phoenix
#

do you use discord.js for the bot?

next flax
#

yep

earnest phoenix
#

Awesome

#

Node.js hosting is freaking easy on repl.it

next flax
#

but how

#

any clue?

earnest phoenix
#
  1. upload the files
  2. press run
  3. done
next flax
#

lol

earnest phoenix
#

literally as easy as that

next flax
#

its 24/7?

earnest phoenix
#

however if you want 24/7 hosting you'll need UptimeRobot too

#

glitch users know how

next flax
#

i know

#

how

earnest phoenix
#

repl.it gives you a free subdomain for each rrpl

next flax
#

i use glitch before

#

too

earnest phoenix
#
<replname>.<username>.repl.co
#

just do the same thing you did for glitch but with this URL

next flax
#

but

#

anyone can steal my code

earnest phoenix
#

yeah

next flax
#

thats bad

earnest phoenix
#

pay up if you want private repls

next flax
#

hm

earnest phoenix
#

also even if you leak the URL of a private repl it will return a 404 unless the user is allowed to see the repl

next flax
#

@earnest phoenix give me ur repl username πŸ˜‚

earnest phoenix
#

lmao i don't pay for repl because i don't use it for hosting private stuff

#

but my friend does

#

@earnest phoenix

next flax
#

but if i m hosting a bot

#

like my friend does

earnest phoenix
#

yrp

next flax
#

his bot is in

#

100+ servers

#

his bot can be hacked

#

😱

earnest phoenix
#

private repls cannot be seen in anyway by people who are not allowed to see

#

his bot can be hacked
@next flax no it can't

next flax
#

how

earnest phoenix
#

if you press a single key on a public repl which you don't have access to repl will just fork the repl instead of let you edit the main

#

and .env files exist

#

env files cannot be viewed by anyone even in public repls

next flax
#

what about gitignore @earnest phoenix as i store in json files

rotund pasture
#

how can i add a banner for my embed (og meta tags for links)

earnest phoenix
#

repl doesn't care about gitignore

#

how can i add a banner for my embed (og meta tags for links)
@rotund pasture og:banner iirc

rotund pasture
#

thx

earnest phoenix
#

@next flax throw yoir token in a .env and now everything that you run in the repl has access to it

#

process.env

next flax
earnest phoenix
#

you've used glitch before so all of this should look familiar

next flax
#

it isnt working tho

earnest phoenix
#

did you press run

next flax
#

you've used glitch before so all of this should look familiar
@earnest phoenix yes i know but glitch takes care of gitignore

earnest phoenix
#

the big button on top

next flax
#

yes i did

earnest phoenix
#

@earnest phoenix yes i know but glitch takes care of gitignore
@next flax gitignore files aren't private data

#

@next flax In which file do you store your main bot code?

next flax
#

server.js @earnest phoenix

earnest phoenix
#

Screenshot the file tab

next flax
earnest phoenix
#

repl.it runs the index.js file by default

#

And your bot is in server.js

#

smh

next flax
#

i mean music.js

earnest phoenix
#

you'll need to make a .replit to tell repl which files to run

next flax
#

my main bot is in server.js

earnest phoenix
#

yo

next flax
#

you'll need to make a .replit to tell repl which files to run
@earnest phoenix how

earnest phoenix
#

who pinged?

next flax
#

who pinged?
@earnest phoenix code

earnest phoenix
#

Put the following in the file:

run = "node command to run the js file"
#

yo code

#

this guy wanted somebody to make him a private repl

next flax
#

music.js?

earnest phoenix
#

Yes

#

If that's your bot file

#

OO

next flax
earnest phoenix
#

By default repl has index.js as main file

#

My bot code is in bot.js so i just put run = "node bot.js"

#

@next flax nope

#

dont add node modules in repl

next flax
#

ok

earnest phoenix
#

That's not a valid bash command

rapid canopy
#

ok
@next flax can you help me

earnest phoenix
#

It's node music.js

rapid canopy
#

i can't fix it

next flax
#

@next flax can you help me
@rapid canopy how

rapid canopy
#

command kick and ban

next flax
earnest phoenix
#

run is like when u press the start button what should u do

#

Lmao

#

@next flax

#

That's your bot file

next flax
#

yes

earnest phoenix
#

I meant in the .replit file

next flax
#

done

earnest phoenix
next flax
rapid canopy
earnest phoenix
#

The modile ain't installed

#

Yoy need to install it via npm

next flax
#

they are listed

#

in the package.json file

earnest phoenix
#

Open a shell using Ctrl + Shift + S then type npm install

next flax
#

ik

earnest phoenix
#

they are listed
in the package.json file
@next flax you can't use magik to install stuff by just listing it in a file

next flax
#

they are installing

earnest phoenix
#

k

rapid canopy
#

help me pls

next flax
#

@rapid canopy what is the error

#

in the console

earnest phoenix
#

Is there anything I could do about my bot being almost rate limited most of the time which slows down its performance?

next flax
#

idk

rapid canopy
#

@rapid canopy what is the error
@next flax don't have error

#

but don't work

#

i don't see anything

next flax
#

same happened with me

#

tho

rapid canopy
#

😦

next flax
#

try docs

soft moon
#

ysus

next flax
#

@earnest phoenix my bot is on yay

#

but now i want to host it on repl.it

#

😒

#

my bot went offline after 2 min

#

;-;

#

hey @earnest phoenix do i have to add https://repl.it/ before ```<replname>.<username>.repl.co

for hosting
rapid canopy
#

!!!

#

help me

next flax
#

nevermind i got docs

young flame
#

make sure its after the console.log
@fluid basin i have it in an array

#

so it changes it's status every 5 seconds

#
const activities_list = [
    `l?help`, 
    `Lucilia.v1`,
    `with ${client.guilds.cache.size} servers!`
  ];
next flax
stable eagle
#

My bot can ping everyone and roles, is there a way to fix that?

earnest phoenix
#

My bot can ping everyone and roles, is there a way to fix that?
@stable eagle discord.js?

stable eagle
#

Yes

earnest phoenix
#

@next flax nope

#

you only need the URL

next flax
#

see

#

new ss

earnest phoenix
next flax
#

i fixed old one

earnest phoenix
#

ok

next flax
#

does repl.it support ffmpeg binaries @earnest phoenix

opaque seal
#

I'm kinda confused on the best tools to build a website as of today. One of the annoying thing I always encounter is css, just making the site responsive and good looking with css is really hard. Also there are a lot of frameworks and I'm confused on which one would be better, why, and if it's needed.
I was looking for suggestions to start building my portfolio (I've only made one website as of right now)

earnest phoenix
#

maybe

#

npm install ffmpeg?

next flax
#

i did

young flame
#

Yes
@stable eagle well

#

the only way you can disabled it is by not making it a command

earnest phoenix
#

Repl runs on Linux

#

So you'll need to do the Linux shit for FFMpeg

next flax
#

what will i have to do

#

what shit

young flame
#

Repl runs on Linux
@earnest phoenix yes but

#

if he has the sorce code

next flax
#

glitch supports ffmpeg

young flame
#

he can host his bot on his bots language

#

since the support every code index

#

from js to cs to ruby

next flax
earnest phoenix
#

I'm kinda confused on the best tools to build a website as of today. One of the annoying thing I always encounter is css, just making the site responsive and good looking with css is really hard. Also there are a lot of frameworks and I'm confused on which one would be better, why, and if it's needed.
I was looking for suggestions to start building my portfolio (I've only made one website as of right now)
@opaque seal
Stuff I'd recommend
Frameworks: d3.js for general SVG stuff and CSS transitions, phasar for games
Website builder: Wix

young flame
#

the only thing is it isnt a terminal so instead of using npm he'd have to do const

next flax
#

it doesnt support[

earnest phoenix
#

F

next flax
#

: (

young flame
#

it doesnt support[
@next flax u dont download it

earnest phoenix
#

done

#

Use opus or smth

distant bramble
#

@next flax i have hosted a test music bot and it works

earnest phoenix
#

It's supported on repl

distant bramble
#

use ffmpeg-static

young flame
#

or just use regular node js

earnest phoenix
#

or just use regular node js
@young flame bruh

young flame
#

what

distant bramble
#

u need to use ffmpg-static

next flax
#

use ffmpeg-static
@distant bramble npm i ffmpeg-static?

young flame
#

Β―_(ツ)_/Β―

earnest phoenix
#

how da fuck would he do discord.js or ffmpeg stuff in regular node.js

young flame
#

how da fuck would he do discord.js or ffmpeg stuff in regular node.js
@earnest phoenix not node js like use the regular discord.js library without ffmpeg

distant bramble
#

u need this

young flame
#

i stayed up all night so i might not sound right

next flax
#

ok

distant bramble
earnest phoenix
#

Repl is fucking awesome

distant bramble
#

ye

young flame
#

yes

#

i use it to

distant bramble
#

its better than glitch

earnest phoenix
#

Repl has some stuff similar to Glitch because both are Linux based stuff but Repl is 100000000000x better than Glitch

young flame
#

its better than vsc

distant bramble
#

atleast it can support my bot

young flame
#

-bots

gilded plankBOT
earnest phoenix
#

its better than vsc
@young flame no it's not
repl is just an online IDE
we're talking about how it is better than glitch for hosting stuff not as an IDE

distant bramble
#

ye

young flame
#

oH

distant bramble
#

lol

earnest phoenix
#

-bots
@young flame ok you stayed up all night but how da fuck does someone use luca outside of testing

distant bramble
#

my bots website looks like a little kids drawing book

young flame
#

i did

#

it's 4 in the morning

#

benn up since 5 in the morning yesterday

earnest phoenix
#

my bots website looks like a little kids drawing book
@distant bramble wait you own glitch!?!?

distant bramble
#

shut up no

#

my bots website

#

tho glitch looks l=more worse

earnest phoenix
#

That's actually pretty cool

distant bramble
#

in a screen shot yhea

#

actual website

#

flashbang

earnest phoenix
#

While Glitch is literally meant to look like a 3-year old kid's drawing book

young flame
#

yes

#

it looks like elon musk if he was a kid and instead of making the tesla cybertruck he colored on a website

rapid canopy
#

...

young flame
#

me need sleep

next flax
#

i thought glitch is better

#

xD

#

now my pc doesnt lag when i edit code

#

😍

young flame
#

Youur question was: am i gay?
Your anwser is: Signs point to yes

#

im dead

earnest phoenix
#

Well if you try to code on mobile on repl.it, almost smoke comes out of your phone, it's like running Minecraft with seus shaders

young flame
#

im gonna try the afk command ttyl

earnest phoenix
#

@next flax If you ever do good luck with that LULW

#

Well if you try to code on mobile on repl.it, almost smoke comes out of your phone, it's like running Minecraft with seus shaders
@earnest phoenix that doesn't happen for me i code all the time on phone and so do you

next flax
#

@earnest phoenix Thanks for help

earnest phoenix
#

nope

next flax
#

why

#

;-;

earnest phoenix
#

lmao wut

young flame
#

wut

#

huh

#

lol

#

nope
@earnest phoenix he thinks your saying your not welcome

earnest phoenix
#

oh

young flame
#

why
@next flax he/they ment np

#

aka no problem

next flax
#

ok

#

how can i add features like bass boost and all in my bot

earnest phoenix
#

i don't know ffmpeg
i don't even have a bot