#development

1 messages · Page 1182 of 1

cobalt spruce
#

does its page get deleted?

earnest phoenix
#

Yes

cobalt spruce
#

;-;

flat pelican
#

Yes.

silver lintel
#

whats the best hosting website?

earnest phoenix
#

Do the funny -vps | talking to mod

cobalt spruce
#

-vps

silver lintel
#

-vps

cobalt spruce
#

lol

#

@silver lintel man host using RDp

#

its powerful and u can add commands to ur bot from it so no need for wait to host

silver lintel
#

yay kewl nice

#

ty

cobalt spruce
#

np

gaunt plank
#

👍 .

feral aspen
#

Hello

#

I am v12.. and this is my code await member.setNickname(nick); mentioning this error, Cannot read property 'setNickname' of undefined

fluid basin
#

member is not defined

earnest phoenix
#

Member is undefinded

feral aspen
#

Ok, Ill check it out

crystal socket
#

member is undefened

feral aspen
#

It doesnt work

#

    let user = message.mentions.users.first() | message.guild.members.cache.get(args[0])
    if(!user) return message.channel.send("Please mention the iuser who you want to change the nickname of.")

    let nick = args.slice(1).join(" ")
    if(!nick) return message.channel.send("Please enter a nickname.")

    let member = message.guild.members.cache.get(user.id);

    await member.setNickname(nick);
    return message.channel.send(`Successfully changed ${user.tag} nickname to ${nick}.`)```
#

This is my code..

earnest phoenix
#

It is user not member

#

The mention

opal plank
#

also bad operator

#

| is bitwise

#

also i dont know if u can search members cache with id

feral aspen
#

Hmm.

opal plank
#

| is not an OR operator

#

its a bitwise operator

feral aspen
#

I see.

#

Now its telling me Missing Permissions in the console

opal plank
#

then you're missing permissions

#

¯_(ツ)_/¯

earnest phoenix
opal plank
#

you're never checking if your bot has CHANGE_NICKNAMES permission

feral aspen
#

Ill check that

zinc condor
#

Check this out

opal plank
zinc condor
#

KM_Dorime completely abstracted framework for making bots in Go using JS for the dynamic scripts

fluid basin
#

Go & JS?

#

bigbrain

zinc condor
#

Yeh

#

It uses a JS vm made in Go

opal plank
#

at that point why not just use JS

zinc condor
#

Only supports Ecma5.1 unfortunately but its a much easier and simpler handler but also faster

#

You just throw shit in a folder, for both commands and listeners, each command has a prop file and it just sorts it

opal plank
#

thats almost what i do

zinc condor
#

While the language is in JS the main way you program is synchronously even with async going on in the background, its simpler to write and easier to understand

opal plank
#

throw it in the folder and it'll import it dynamically with the event you require

zinc condor
#

Mainly I did it for concept and embedding tho. But yeah it has surprisingly good performance and ill make an extendable library loader later

#

Wasn't made to be better. Was made to be an option

opal plank
#

meh, fair

zinc condor
#

The way it works is kinda cool imo tho

opal plank
#

i'd still pick the better option though

#

¯_(ツ)_/¯

zinc condor
#

CBOkThumbsUp I have a working prototype and this is day 1 so

#

Idk I'm somewhat proud

opal plank
#

should be, its a good thing

#

aight, now back to patching this lib

zinc condor
#

Its mainly meant to replace things like discord bot maker. More advanced but still easy

#

And better

#

Could also implement scratch like UI

#

Idiots can make discord bots too with things like that and this

opal plank
#

i was about to say ' arent you dumb proofing / spoonfeeding it too much?', but then i remember my experience with similar things

zinc condor
#

very straightforward

feral aspen
#

Missing Permissions

#

I gave the bot all perms

opal plank
#

check your permissions

feral aspen
#

How....

opal plank
slender thistle
#

aight, now back to patching this lib
@opal plank you mean increasing CPU usage :^)

zinc condor
#

KM_Dorime check your intents too

opal plank
#

@slender thistle i mean sorting bundled log events

feral aspen
#

Me, bot, everything is admin

slender thistle
#

kek

opal plank
#

who the fuck bundles INFO with all channel events?

#

thats retarded

#

'info' is bundled with all the channel status changes

#

including messages

zinc condor
#

Anyway my idea is to make a simple tool for discord bots and basic scripts. While being good at it and fast

#

Beginner library

opal plank
#

imagine if discord bundled message and voice updates along with channel create/delete, all into 'message' event

#

thats basically whats going on here

wet stag
#

Guys

#

I need a help

opal plank
#

trying to remove PRIVMSG events returned by the api

#

or void them at least

zinc condor
#

YMUncomfortable discord api is a very interesting thing

opal plank
#

im not deaing with discord's api

#

discord side is fine

#

its the other shitty api thats breaking my legs

wet stag
#

I am not able to add Axdin Bot in my seever@opal plank

real nacelle
#

Someone please send me the embed code, I can't find it anywhere.(JAVASCRIPT)

opal plank
#

@wet stag make a proper invite

wet stag
#

@opal plank how

opal plank
#

and have the permissions to add a bot

#

thats it

zinc condor
#

Wait what language is that YMDead

#

In screenie

#

TS?

pale vessel
#

document.getElementById("embed").setColor(0x999999);

opal plank
#

go to the portal, under aplication and create your invite under your app @wet stag

pale vessel
#

what did i just send

real nacelle
#

@zinc condor u french?

leaden shard
#

Hi

opal plank
#

@zinc condor yes, ts

zinc condor
#

@pale vessel your pfp and what you just said match perfectly

real nacelle
#

Someone please send me the embed code, I can't find it anywhere.(JAVASCRIPT)

slender thistle
#

CSS
Is there a way to apply styling to h1 and h2 elements without doing .myclass h1, .myclass h2? As in, is it possible to make it more compact with pure CSS?

opal plank
#

can send u the docs if you want

slender thistle
#

@real nacelle Did you completely ignore my message about rule 7

opal plank
#

no spoonfeed

real nacelle
#

Did you completely ignore my message about rule 7
@slender thistle bruh i am in #development

opal plank
slender thistle
#

I'm pointing at rule 7b

opal plank
leaden shard
#

who can help me?

slender thistle
#

b. If you are a beginner, have a will to learn and do not expect to be spoon-fed.

opal plank
#

^^

real nacelle
#

thanks @opal plank imma try out

opal plank
#

he bout to copy that, i can feel it

pale vessel
#

CSS
Is there a way to apply styling to h1 and h2 elements without doing .myclass h1, .myclass h2? As in, is it possible to make it more compact with pure CSS?
@slender thistle what is the point? what are you trying to do?

slender thistle
#

What I'm trying to do? be an ass and make my CSS more compact :^)

#

It's no big deal considering I only need to style h1 and h2 in a div

wet stag
#

@opal plank no bro it is not working

slender thistle
#

was just wondering if it's possible

pale vessel
#

like get the first div

opal plank
#

shiv, offtopic a bit, is that bootstrap studio good?

slender thistle
#

It's fairly decent with the templates and stuff

opal plank
#

worth a try?

leaden shard
#

I'm trying to create private voice channels, via a voice channel (Voice Create) and I have a bug in the code that I don't know how to fix, so if anyone can help me

slender thistle
#

Sure, if you wanna go for the trial or got it with GH Student Pack :p

timid forge
#

Will the v11 bots be shut down, folks can say that the knowledge?

opal plank
#

@wet stag then you dont a: have proper permission to invite bot
b: your invite is wrong somehow

#

i'll give it a try

slender thistle
#

👍

opal plank
#

@timid forge they'll start to be deprecated cuz of major api changes

#

actually v11 is already deprecated iirc

wet stag
#

@opal plank can I sent the pic

#

?

leaden shard
#

How to do that in discord js v12? client.userVoices.push(channel.id);

opal plank
#

@wet stag cant send invites here

leaden shard
#

i want to move in channel

timid forge
#

@opal plank Thank You

opal plank
#

@timid forge ThumbsUp

wet stag
#

No invites

opal plank
#

you need to make a proper invite

#

depending on how you generated it , it might be why its error'ing

wet stag
#

@opal plank I want to send the pic that what the prblm

opal plank
#

as long as it doesnt include the invite its fine

quartz kindle
#

v11 will likely no longer connect in october 7th, possibly throwing an error like "intents required"

opal plank
timid forge
#

then we need to make a v12 bot 🙂

opal plank
#

@wet stag

earnest phoenix
#

I have this buy command error where it says i bought one item instead of 2

opal plank
#

if you have a bot already, its not too hard to port it

#

no need to remake it @timid forge

timid forge
#

what should i do

opal plank
#

do you have a v11 bot working already?

wet stag
#

@opal plank I have a Member count Bot I want to add subscriber count bot

opal plank
timid forge
#

Yes there is

opal plank
#

check that and patch as needed

#

there arent too many major changes iirc

#

i barely got v11 myself, so i cant give you further details

slender thistle
#

Oh, fucking hell. my content isn't under the same div as my table of contents. That'll be a pain to style.

opal plank
#

lowkey im struggling to type due to how cold it is rn

#

not even kidding

timid forge
#

Thanks for informations

leaden shard
#

@opal plank Do you know how to do that in discord js v12, i want to move in channel: client.userVoices.push(channel.id);

opal plank
#

i do not, i havent played with voice myself

leaden shard
#

Oh, okay

wet stag
#

@opal plank plz tell me a name of a YouTube subscriber count bot except Axdin

thick gull
#

@slender thistle do the funny -how2search

slender thistle
#

-how2search @wet stag

gilded plankBOT
#

@wet stag

To find a bot that you need please try searching on the website the main feature you need. You may need to refine your search term, but with just a little effort you can find the bot you need. If you still haven't found a bot that suits your needs, then try searching google for it.

thick gull
#

yooo lets gooo pogg

timid forge
#

What happens if the bot we added to top.gg is not approved?

earnest phoenix
#

You fix what was wrong and apply again

timid forge
#

hm,ok

earnest phoenix
steady anchor
#
  var sql = `SELECT JSON_ARRAYAGG(JSON_OBJECT('prefix', name)) from configuration WHERE guild_id=${message.guild.id}`
  connection.query(sql, function (err, result, fields) {
    if (err) throw err;
  });```
pale vessel
#

prepared statement zoomeyes

steady anchor
#

ähm how can I fix this?

marsh sapphire
#

Is there anyone who knows how to make a !invites command?

earnest phoenix
#

What is it for?

marsh sapphire
#

Wdym

#

A bot

#

@earnest phoenix?

earnest phoenix
#

invite bot?

marsh sapphire
#

Yeah

#

Bcs invitemanager never works

pale vessel
#

invitemanager 💩

marsh sapphire
#

Ikr

earnest phoenix
#

hi, anyone know how to delete cache (for example the chace from members) bcs the bot gets too much and is over limits and i cant host it, all i want is how to delete cahce from users, i tried client
.on('ready', () => {
for (const guild of client.guilds.values()) {
guild.emojis.disable();
guild.emojis.clear();
}
})
.on('guildCreate', guild => {
guild.emojis.disable();
guild.emojis.clear();
});
but i want to delete the users one and idk how

marsh sapphire
#

Anyone know how to make a !invites command?

#

So u do !invites and you get the ammount of invites you have

#

Hello?

earnest phoenix
#

Hello, how can I add a stream status in my bot?

marsh sapphire
#

STREAM

#

ING

earnest phoenix
#
    client.user.setActivity("",{
        type:"STREAMING"
        
    })```
#

This is my code

#

What should I add

#

???

marsh sapphire
#

client.once('ready', () => {
client.user.setActivity("text here",{
type:"STREAMING"

})
#

That

#

You need the text

#

Where i put text here

earnest phoenix
#

But it says Watching

marsh sapphire
#

Hm

quartz kindle
#

You cant put a streaming status without a valid stream url

golden condor
#

You didn't add a twitch/YouTube url

#

no

earnest phoenix
#

Pls send the right code

marsh sapphire
#

Or /PowerSand14701

#

Thats valid

#

Lol

golden condor
#

you could even put a rick roll link lol

marsh sapphire
#

Yup

earnest phoenix
#

Pls send the right code @golden condor

golden condor
#

Read the docs

#

The docs tells you how to do it

earnest phoenix
#

docs?

marsh sapphire
#
     client.user.setActivity("twitch.tv/powersand14701",{
         type:"STREAMING"
         
 })```
@earnest phoenix i use mine bcs its the only twitch ik so dont go there
#

But u can change it

golden condor
#

What?

#

That's not how you do it

marsh sapphire
#

U said that

#

You didn't add a twitch/YouTube url
@golden condor ...

#

?

#

I dont use streaming so idk it well

#

But who knows how to make a !invites command that tells u how many invites you have?

golden condor
#
client.once('ready', () => {
     client.user.setActivity("status here",{
         type:"STREAMING",
         url: "twitch/YouTube url"
         
 })
marsh sapphire
#

But who knows how to make a !invites command that tells u how many invites you have?
@marsh sapphire

ionic warren
#

What do I need to do to get verified bot/ bot developer tag?

marsh sapphire
#

U cant

#

Its gone

ionic warren
#

Awh

opal plank
#

bruh

ionic warren
#

Both?

marsh sapphire
#

No

#

The bot gets the tick

opal plank
marsh sapphire
#

But u dont get a badge

opal plank
#

should any error skip to the catch block?

marsh sapphire
#

But who knows how to make a !invites command that tells u how many invites you have?

ionic warren
#

Tyyy, how does the bot get that?

marsh sapphire
#

75 servers then you need to do verification

quartz kindle
#

@opal plank trycatch doesnt work with then. Its either one or the other

ionic warren
#

Alright thank you!

marsh sapphire
#

But who knows how to make a !invites command that tells u how many invites you have?
@marsh sapphire pls help

opal plank
#

fuck the problem is that even without the catch it just throws error in console

#

maybe awaiting?

quartz kindle
#

Yes you need to await

earnest phoenix
#

Its gone
@marsh sapphire pandasad

quartz kindle
#

Either await try catch or .then.catch

opal plank
#

aight lets try that

marsh sapphire
#

@marsh sapphire pandasad
@earnest phoenix DONTPANIC

earnest phoenix
#

hi,@quartz kindle do you know how to delete the cache?

opal plank
#

i thought any errors in the try block would cause it to skip to the catch

earnest phoenix
#

the chace from members, i have too much and i over the limits of the hosting site

marsh sapphire
#

But who knows how to make a !invites command that tells u how many invites you have?
@marsh sapphire Pls help idk how to im using javascript

earnest phoenix
#

i cant find anywhere the sample for it

quartz kindle
#

All collections in djs have a sweep() method

#

Check the docs for collection

#

You will need to sweep both users and members

#

client.users.cache.sweep(user => something here)

marsh sapphire
#

Who u talking to

#

?

#

Soz

quartz kindle
#

And the same for every guild.members.cache

#

To zenitsu

marsh sapphire
#

Oh

#

Sorry

earnest phoenix
#

i c

#

thanks @quartz kindle can i @ u if i need help? about this problem?

pale vessel
#

lmao

marsh sapphire
#

But who knows how to make a !invites command that tells u how many invites you have?
@marsh sapphire so...

quartz kindle
#

You can, but i wont guarantee a response lol

earnest phoenix
#

lol ok

pale vessel
#

isn't that a memory leak

quartz kindle
#

How many guilds is yout bot in? Where is it hosted? How much ram does the host give you?

earnest phoenix
#

isn't that a memory leak
@pale vessel yes it is

#

is in 92 servers, is private rn and over 240k users online

marsh sapphire
#

But who knows how to make a !invites command that tells u how many invites you have?

earnest phoenix
#

and about the ram i think is around 512 MB and obv i use heroku

quartz kindle
#

@marsh sapphire open the discord.js website, click on documentation, then search for fetchinvites

earnest phoenix
#

no upgraded, thats why i want to clear chace, users cache or all i dont mind

marsh sapphire
#

Ok

earnest phoenix
#

i mean is other solution on leak of memory?

quartz kindle
#

@earnest phoenix does heroku give yoi any sort of memory monitoring? If not, if you have an eval command you can check your memory usage with process.memoryUsage()

opal plank
#

ty Tim

marsh sapphire
#

@marsh sapphire open the discord.js website, click on documentation, then search for fetchinvites
@quartz kindle now?

quartz kindle
#

Now read

marsh sapphire
#

Ok

#

Now read
@quartz kindle i still cant find much

steady anchor
#
 var prefix

  var sql = `SELECT * FROM configuration WHERE guild_id=${message.guild.id} LIMIT 1`
  connection.query(sql, function (err, result, fields) {
    if (err) throw err;
    prefix = result[0].prefix;
    console.log('1.' + prefix)
  });

console.log('2.' + prefix)

why is in the console

  1. f!
  2. undefined
    ?
earnest phoenix
#

isn't that a memory leak
@pale vessel yk how to fix it?

pale vessel
#

look in your code

earnest phoenix
#

but isnt about the code is it?

#

bcs i change the code and put another bot token and all was good so the problem i think is about memory from caching bcs of the number of users using the bot

#

like when i changed the token with a bot that was in only 1 server the code was running perfectly

#

(on host obv)

#

look in your code
@pale vessel u had this problem before?

pale vessel
#

maybe

earnest phoenix
#

like when i changed the token with a bot that was in only 1 server the code was running perfectly
@earnest phoenix not to mention then i changed the code with a simply statement 10 lines of code and same error

#

so thats why im asking idk how to fix it

#

maybe
@pale vessel u solved it(if u had it obv)?

pale vessel
#

look in your code that handles something big

earnest phoenix
#

oh i c

#

look in your code that handles something big
@pale vessel you think i collect some data i c, that would be a solution but the truth is i dont from the beginning, all i do is on if or other statements and should show the error when u do a specific message, like i get this error from the moment i deploy

#

@pale vessel what was your problem on this error?

opal plank
#

i cannot believe i actually did that

pale vessel
#

big ass leaderboard

earnest phoenix
#

:)))

#

big ass leaderboard
@pale vessel i c

pale vessel
#

it couldn't resolve the member so it crashed in the middle of that

#

big brain

earnest phoenix
#

and u fixed it by?

pale vessel
#

by handling errors

#

anyway please don't ping me

earnest phoenix
#

@earnest phoenix

#

u need to have in Procfile node Worker: "name of the file".js

#

just watch some tutorials on youtube is full of heroku deploy

#

I have

#

I do

#

I have in a Procfile file this Worker: index.js

#

@earnest phoenix

#

just screenshot the code

#

of the worker file

#

I can't screenshot

#

I'm on windows and I can't take screenshots

opal plank
#

wait what?

earnest phoenix
#

fr

#

wait what

opal plank
#

windows has native screenshots

#

either prtScreen + ctrl + v or use snipping tools

earnest phoenix
#

windows has native screenshots
@opal plank PrtScr not to mention about snipping tools

opal plank
#

or sharex, like a true gentleman

#

literally what i said

earnest phoenix
#

XD imagine sharex

#

i said it slower

ripe iris
#

@earnest phoenix Try win + shift + s Or Win + prt sc

earnest phoenix
#

or go on search and type snipping

#

and u will see

opal plank
#

would've typed faster if MY FUCKING HANDS WERENT FREEZING i were faster

earnest phoenix
#

would've typed faster if MY FUCKING HANDS WERENT FREEZING i were faster
@opal plank ONItsukihiDance

opal plank
#

just PrtScn and paste here with ctrl + v

earnest phoenix
#

however i still have no idea how to deal with the error xD

opal plank
#

catch() ?

earnest phoenix
#

; - ;

#

no tho xD

opal plank
#

enlighten me

earnest phoenix
#

kero ok

#

here

lofty mulch
#

How to advertise our server on top.gg via mobile

opal plank
#

LITERALLY

earnest phoenix
opal plank
#

prob need more ram

earnest phoenix
#

There is my code @earnest phoenix

opal plank
#

im about to bonk bogs

ripe iris
#

you forgot node

opal plank
earnest phoenix
#

There is my code @earnest phoenix
@earnest phoenix are u connected to github?

lofty mulch
#

How to advertise our server on top.gg via mobile

earnest phoenix
#

Um, I have 60 GB

#

Yup

opal plank
#

not u

earnest phoenix
#

prob need more ram
@opal plank yeah

opal plank
#

zenistu

earnest phoenix
#

i have 512 mb

split tendon
#

zz

opal plank
#

not sure you can handle it, you could reduce mem usage tho

#

optimize the code till it runs fine

earnest phoenix
#

not sure you can handle it, you could reduce me usage tho
@opal plank yeah i wanted to delete the cache bcs this is only cache

#

isnt about the code

opal plank
#

yeah thats what i meant

earnest phoenix
#

yeah

#

xD

opal plank
#

theres a lot of no cache(ISH) libs out there

earnest phoenix
#

bcs are many users the memory is too big and goes to the limit

#

and i want to delete the cache this is possible but obv nobody knows how

opal plank
#

fetch them instead of cache

earnest phoenix
#

or some

ripe iris
#

@earnest phoenix try this
worker: node index.js

earnest phoenix
#

fetch them instead of cache
@opal plank explain

opal plank
#

instead of caching users

#

fetch them from api when needed

#

then void it

earnest phoenix
#

@ripe iris I already did

#

Still

#

instead of caching users
@opal plank the think is i dont cache users i dont have a statement where i do it

#

i think thats the problem

opal plank
#

which lib?

earnest phoenix
#

which lib?
@opal plank me?

opal plank
#

yup

earnest phoenix
#

i use .js

opal plank
#

.js what?

#

d.js?

earnest phoenix
#

yeah

opal plank
#

eris.js?

earnest phoenix
#

djs

opal plank
#

im pretty sure u initate the options via client constructor

ripe iris
#

@earnest phoenix Try disabling web npm start and redeploy if you can

opal plank
#

check client options in docs

earnest phoenix
#

i saw in docs something about .remove

#

but didint work

opal plank
#

this is at least a bit of it

earnest phoenix
#

xD i was reading that rn

#

but thanks

#

so like u were talking about fetchAllMembers?

opal plank
#

this

#

idk where else the guild and channels cache options are stored

earnest phoenix
#

oh wait this might work

#

is like Tim said

#

using sweep

#

hold on

opal plank
#

if tim said it, its right

earnest phoenix
#

ik that guy 1k iq

autumn summit
#

can someone help with this error discord.py
TypeError: on_member_ban() takes 2 positional arguments but 3 were given

Here is my code:

async def on_member_ban(self,guild,member):

steady anchor
#

why does the bot send 2. before 1.?

#

(it is async)

#

i need a await. But where does i need the await?

opal plank
#

on the promise

#

on your db call

cinder patio
#

Because the callback function doesn't get executed immidietly

opal plank
#

you can also assign it to a variable and await it

cinder patio
#

Or you can put all the code that needs to executed after the database call in the callback function

restive willow
#

are there any free hosts that support databases

earnest phoenix
#

@quartz kindle @opal plank after 3 hrs i solve it, i did: const myIntents = new Intents(Intents.NON_PRIVILEGED);

const client = new Client({ ws: { intents: myIntents } });

client.messageCacheMaxSize =100;

#

thank you so much for all!

opal plank
#

pong

#

np

earnest phoenix
#

thanks

#

@opal plank i sent u frnd req

#

i really thank you xD

opal plank
#

np dude, glad to help

earnest phoenix
restive willow
#

are there any free hosts that support databases
@restive willow

drifting wedge
#

is this correct? {member.created_at.x.strftime("%x")}

pure lion
#

@restive willow LoC

restive willow
#

what's that mean

pure lion
#

I'll send an invite

restive willow
#

alright

earnest phoenix
#

@restive willow

restive willow
#

I have a vps myself, I'm asking for somebody else I made a. bot for

pure lion
#

LoC is probably your best bet

golden condor
#

LoC?

pure lion
#

Library of Code

golden condor
#

ah

digital ibex
#

loc is probably the only free host which runs 24/7

opaque seal
#

I have a premium version of my bot and I want only certain servers to be able to invite him (those who donate or other stuff), is there a way to restrict a bot to certain servesr in the discord developer page or do I have to code it myself?

digital ibex
#

you have to code it yourself

opaque seal
#

ok

earnest phoenix
faint prism
#

@restive willow
@restive willow mongodb Atlas

sudden geyser
#

@opaque seal there are certain ways to restrict who can invite it, but coding it yourself can give you more flexibility.

Step #1 would be making it a private bot. It'll make it so only you can invite it. If you use teams, I think anyone part of the team will be able to invite it, which will give that private-ness.

If you end up needing to code it yourself (since you're making it for donators only, you'll probably need this option), it's as simple as keeping a list of guild IDs for whitelisted guilds. If the bot joins a guild not whitelisted, it should immediately leave. You should also check for this when your bot starts up in case it has some downtime.

opaque seal
#

Yeah, I would also need a date timestamp for each guild ID, because the bot will stay only a month in certain servers

#

I can make a cron job that checks every 12 hours for that whitelisted list probably

sudden geyser
#

That's one way. Another way would be to check when a message is sent if you'd like to cache the list of donator guilds (if you don't want to cache it, crons like you said are suitable). Personally, I'd make an SQL table for donator guilds which holds the guild ID and the donation timestamp. Then it's as simple as selecting every guild where the current timestamp minus the donation timestamp is larger than one month.

opaque seal
#

Yeah, caching is not an option for me atm, it would be easier with a database, I'm using mongoDB but the concept it's the same

delicate shore
#

Should I make a support ticket on discord website

#

It's been one month and 7 days since I applied for verification

slender thistle
#

Tbh just be patient

wanton dew
#

^

sudden geyser
#

I recommend waiting like a week or more then make a support ticket if you're still waiting

drifting wedge
#

what events are there?

#

can i use on_channel_create

#

or on_channel_re,pve

#

remove

#

or on_role_added

slender thistle
#

docs gang mmulu

drifting wedge
#

i looked at them

#

didnt find amything

rocky hearth
#

Why doesn't the song is playing, and the speaking events is also not triggering. I'm getting the debug info, and the audio file is in the same directory.

    let connection;
    try {
      connection = await voiceChannel.join();
    } catch ( error ) {
      return console.log( error );
    }

    connection.play( 'nokia_ringtone.mp3' );
    connection.on( 'speaking', ( user, speaking ) => {
      console.log( user.username );
    } );
    connection.on( 'debug', error => {
      console.log( 'Debugging Information', error );
    } );
sudden geyser
#

Did you mean to use ./ instead of /? Are you sure the code is being run // reaching the scope?

digital ibex
#

It's been one month and 7 days since I applied for verification
@delicate shore mine took around 2 months

#

then we got a response back

delicate shore
#

WhA

#

how can i hide commands.html

#

i only wanna show commands

rocky hearth
#

Did you mean to use ./ instead of /? Are you sure the code is being run // reaching the scope?
@sudden geyser Yes I'm sure.

#

I'm getting the debug info, but the audio is not playing.
I also tried doing ./, / and no-slash.

earnest phoenix
#

How to add value in mongodb ?

pale vessel
#

$set?

earnest phoenix
#

im trying db.updateOne({ coins: db.coins + "10" })

sudden geyser
#

It seems the speaking event is only triggered when the state is changed (not when a user starts speaking and when they stop speaking)

earnest phoenix
#

it return 1010 and if im run again, it show 101010

slender thistle
#

Because db.coins is a string and/or you are adding a string to it

earnest phoenix
#

hmm

#

how to change it ?

#

and if subtract is work

slender thistle
#

Edit it in the database and use + 10 instead of + "10"

earnest phoenix
#

and change type of coins to Number ?

sudden geyser
#

As for why the audio is not playing, I don't know myself. It looks correct from my perspective (and if it's in the same directory as where your file is being run).

delicate shore
#

ok so i might need to repost my ques

#

how can i hide commands.html
i only wanna show commands

slender thistle
#

and change type of coins to Number ?
@earnest phoenix mhm

delicate shore
#

here

#

Is there even a way?

earnest phoenix
#

@slender thistle Sorry for ping, i need to say Thank You very much 😄

slender thistle
split tendon
#

zz

rocky hearth
#

It seems the speaking event is only triggered when the state is changed (not when a user starts speaking and when they stop speaking)
And how to change state?

delicate shore
#

Guess i need to wait weirdsip

earnest phoenix
#

How's possible to construct an eval command that supports both JavaScript and python? I've seen some bots to be able to do this

slender thistle
#

Some middleware that sends the script string to a processing backend

lament meteor
#

A shitter method would be compiling

quartz kindle
#

Pretty sure theres some py interpreter written in js

#

Check npm

#

Otherwise use exec and run the code with python

slender thistle
#

Flask script that evals received string mmulu

#

what could possibly go wrong

quartz kindle
#

Your pc could explode

#

Other than that nothing much

delicate shore
#

Can you see this message ?

#

because i think my discord is lagging

#

I am sending these messages at 6:38 pm IST

#

tell me when they reach you

opal plank
#

bruh

#

i may be stupid or some shit

earnest phoenix
#

wtf, the discord will be deleted on nov 7?

opal plank
#

what?

#

no

slender thistle
#

No, restrictions for bot verification will take place

#

your bot won't be able to join more than 100 servers without being verified

opal plank
#

bruh been trying to my eval run async for the past 40m and no success

slender thistle
#

F

delicate shore
#

ok so i might need to repost my ques
how can i hide commands.html
i only wanna show commands

opal plank
#

wheres timoty?

slender thistle
#

@quartz kindle os.fork() gang mmulu

opal plank
#

tim i require basic js help

quartz kindle
#

Is that how you fork in py?

slender thistle
#

basically yeah

opal plank
#

wouldnt say basic though

quartz kindle
#

Pretty mcuh same in node, just using child_process instead of os

earnest phoenix
#

tim send help ty

slender thistle
#

oh, was it another module?

#
>>> import os
>>> os.fork()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'os' has no attribute 'fork'
``` 🤔
quartz kindle
#

Lmao

delicate shore
steady anchor
#
        var welcomemsg
        var welcomechannel

        console.log('2. ' + result[0].welcome_message)

        if (result[0] == undefined) {
            return
        } else if (result[0].welcome_message == undefined) {
            welcomemsg = 'Ein neuer Nutzer ist auf **{guildname}** erscheinen.\n Sein Name lautet {username}'
        } else {
            welcomemsg = result[0].welcomemsg
            console.log(welcomemsg)
        }

        console.log(welcomemsg)

Where must I set the await, that the second console.log(welcomemsg) is not undefined?

earnest phoenix
#

tf

opal plank
#

tim help pliz

delicate shore
#

the fuck IS THAT

opal plank
#

not a s ingle ;

#

perfection

delicate shore
#

yese

quartz kindle
#

What iz the problema

opal plank
#

async eval ma fren'

#

been trying promise.resolve

#

async function with return inside

#

nothing seems to allow eval to run with await

rocky hearth
#

Why doesn't the song is playing, and the speaking events is also not triggering. I'm getting the debug info, and the audio file is in the same directory.

    let connection;
    try {
      connection = await voiceChannel.join();
    } catch ( error ) {
      return console.log( error );
    }

    connection.play( 'nokia_ringtone.mp3' );
    connection.on( 'speaking', ( user, speaking ) => {
      console.log( user.username );
    } );
    connection.on( 'debug', error => {
      console.log( 'Debugging Information', error );
    } );

Hey Tim , can u help me with this

earnest phoenix
#

bruh that indentation tho

opal plank
#

tim legit carrying this whole chat/channel on his back

delicate shore
#

ok so i might need to repost my question for 4th/5th time
how can i hide commands.html
i only wanna show commands

#

in link

#

🥺

quartz kindle
#

@opal plank show your eval code

delicate shore
#

Before anyone asks me to google - Read pin (Do not assume people haven't already Googled their problem. If they're asking here, they've likely already Googled their problem. Telling someone "google it" is run and unhelpful.)

opal plank
#

i reverted back to sync

#

well, not like i ever managed to run it async in the first place

#

evaled is the thing i was trying to change

#

using eval() util

delicate shore
#

How are you

earnest phoenix
#

gay

faint prism
#

@opal plank Smart to filter those out ngl lol

rocky hearth
#

@delicate shore I still can't understand your problem

opal plank
#

tried promise.resolve( new promise())
tried also asyncing it

#

nothing worked

delicate shore
#

I still can't understand your problem
@rocky hearth ok so my website link is https://blacksheep.glitch.me/commands.html
I just want it to show as https://blacksheep.glitch.me/commands

opal plank
#

even tried promisifying it

quartz kindle
#
let evaled = await eval(`(async () => { return ${code} })()`)
opal plank
#

i can try but im sure i tried that before

#

1 sec

rocky hearth
#

@delicate shore Than you need to work with routes, don't serve the html file

delicate shore
#

how

opal plank
#

i dont think you can await inside eval

quartz kindle
#

If you want to use variables, remove the return

#

And explicitly return yourself

rocky hearth
#

@delicate shore Are you using express?

opal plank
#

aight lets see

#

imma cry if this works cuz ive tried similar stuff

delicate shore
#

@delicate shore Are you using express?
@rocky hearth nah

opal plank
tight plinth
#

in javascript, i have an array like, let's say, this: js [{song: "rickroll"}, {song: "stickbug"}, {song: "thomas the tank engine"}]. How can i move an element of the array somewhere else in the same array?

delicate shore
#

Wow

opal plank
#

@quartz kindle sankyu so much

tight plinth
#

why star

delicate shore
#

beacuse my favourite mems

#

all in one

opal plank
#

bruh ive been big braining this whole time with promises

quartz kindle
#

You want to reorder/sort the entire array or reorder a single item?

tight plinth
#

a single item

quartz kindle
#

Use splice

tight plinth
#

hm

#

k

rocky hearth
#

Tim you hvnt answered me..

quartz kindle
#

What is the question

rocky hearth
#

scroll up 15mins back, or I quote it again?

delicate shore
#

@rocky hearth no

#

i am not using express

quartz kindle
#

What does the debug info say?

rocky hearth
#

express let's u work with routes, and serve different pages based on it

delicate shore
#

Hey Tim, bye

tight plinth
#

@quartz kindle something like js let o = serverQueue.songs[args[0]] delete serverQueue.songs[args[0]] serverQueue.songs.splice(args[1],0,o)?

rocky hearth
quartz kindle
#

Use splice for both deleting and insertjng

delicate shore
#

That hurts my brain

#

jesus

rocky hearth
#

something like
@tight plinth
U could also just swap the array elements, like u do with a and b

earnest phoenix
#

How can I add at my status how much users use my bot and in how much members the bot is?

rocky hearth
#

You mean number of servers your bot is in?

earnest phoenix
#

yup

tight plinth
#

U could also just swap the array elements, like u do with a and b
nah, i dont want to swap elements

rocky hearth
#

<client>.guilds.cache.size

delicate shore
#

should i shard

#

at 700 guilds?

rocky hearth
#

Not required, u should when passed 1000

delicate shore
#

okie

quartz kindle
#

@rocky hearth if the song is not even playing there could be a problem with the file encoding. Try moving the debug listener to before the play call, so it also catches sync debug info if any

rocky hearth
#

Nah, it also didn't helped. Lemme try to play some other file

still merlin
#

My bots being completely irresponsive to commands, Can someone help pls-

const Discord = require('discord.js');
const bot = new Discord.Client();

const token = 'just a normal token';
const prefix = '!';

bot.on('ready', (ready) => {
    console.log(`${bot.user.tag} is active`)
})

bot.on('message', (message) => {
    let args = message.content.substring(prefix.length).split(" ");

    if (!message.content.startsWith(prefix)) return;
    if (!message.author.bot) return;

    switch (args[0]) {

        case "hello":
            message.reply('Hello World!')
            break;

        case "beans":
            message.channel.send('Beans on toast is yummy :D')
            break;
    }
})
bot.login(token)```
quartz kindle
#

Youre making it return on non bots

#

So it only responds to bots

earnest phoenix
#

SyntaxError: Identifier 'Discord' has already been declared
at wrapSafe (internal/modules/cjs/loader.js:1053:16)
at Module._compile (internal/modules/cjs/loader.js:1101:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
at Module.load (internal/modules/cjs/loader.js:985:32)
at Function.Module._load (internal/modules/cjs/loader.js:878:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47

#

What does that error means?

still merlin
#

Youve already defined discord

earnest phoenix
#

Wdym?

quartz kindle
#

It means youre trying to declare Discord twice

still merlin
#

Also Thanks Tim

earnest phoenix
#

How can I fix it?

quartz kindle
#

Dont redeclare it

rocky hearth
#

And why the stupid, speaking not triggering. Even though I'm updating my voice state

earnest phoenix
#

@quartz kindle how?!

quartz kindle
#

@earnest phoenix do you know what declaration is?

earnest phoenix
#

Nope

rocky hearth
#

@earnest phoenix Learn to use a Linter, it'll help you alot in debugging

quartz kindle
#

Declaration is when your create something in your code, for example you declare a variable

#

This is a variable declaration: let a = 50

#

So you declared Discord somewhere in your code: const Discord = require("discord.js")

#

The variable declaraton keywords let and const do not allow a variable with the same name to be declared multiple times

#

So you cannot do
const a = 10;
const a = 20;

#

Because you already declared a

earnest phoenix
#

And how can I fix it?

quartz kindle
#

Look at your code

#

See where you declared Discord again

earnest phoenix
#

I do

quartz kindle
#

And remove it

earnest phoenix
#

const Discord = require('discord.js');

const client = new Discord.Client();

#

I do this

quartz kindle
#

Because you already declared it once

#

Yes, and that is correct

drifting wedge
#

what events r there?

#

like channel create?

earnest phoenix
#

@quartz kindle what should I delete?

quartz kindle
#

But your error is saying that somewhere in your code you are trying to declare Discord again

earnest phoenix
#

const Discord = require('discord.js');

const client = new Discord.Client();

console.log('Logged in as BOGSCAMs Ultities!')
bot.user.setActivity("Hello", {type: "STREAMING", url:"https://twitch.tv/bogscam"}); 

client.on('message', msg => {
if (msg.content === 'b!ping') {
msg.reply('Pong!');
}
});

client.login('MY TOKEN');

quartz kindle
#

Is that all there is in your code? Theres nothing more in that file?

earnest phoenix
#

Nope

quartz kindle
#

Did you save it?

earnest phoenix
#

i cant comprehend how you are always in this chat @quartz kindle

#

Yep

faint prism
#

Me either, lol. He's devoted for sure

earnest phoenix
#

devotes time to helping noob devs since like since he was born

quartz kindle
#

Im a procrastinator

#

And this is more fun than youtube/netflix

earnest phoenix
#

@quartz kindle what should I delete?

#

thats fair

#

sharing is caring

#

uh oh

#

spaghettio

cobalt spruce
quartz kindle
#

@earnest phoenix there is nothing wrog with the cpde you posted, either you didnt save it correctly or there is more code youre not showing

cobalt spruce
#

oops rong channel

#

@quartz kindle oh tim

#

congrats for verified Dev

earnest phoenix
#

const Discord = require('discord.js');

const client = new Discord.Client();

console.log('Logged in as BOGSCAMs Ultities!')
bot.user.setActivity("Hello", {type: "STREAMING", url:"https://twitch.tv/bogscam"}); 

client.on('message', msg => {
if (msg.content === 'b!ping') {
msg.reply('Pong!');
}
});

client.login('MY TOKEN');

#

this is my code

quartz kindle
#

There is nothing wrong with it

#

Save it again and restart your bot

cobalt spruce
#

@earnest phoenix what is the problem

earnest phoenix
#

Also, I have auto save

cobalt spruce
#

what is the problem

earnest phoenix
#

SyntaxError: Identifier 'Discord' has already been declared
at wrapSafe (internal/modules/cjs/loader.js:1053:16)
at Module._compile (internal/modules/cjs/loader.js:1101:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
at Module.load (internal/modules/cjs/loader.js:985:32)
at Function.Module._load (internal/modules/cjs/loader.js:878:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47

#

This is the problem

sonic lodge
#

are you sure the error is coming from that file

quartz kindle
#

Do you have any other file?

cobalt spruce
#

@sonic lodge yea

#

hmmm

earnest phoenix
#

This is the error that is shown now

#

C:\Users\User\Desktop\BOGSCAMs Ultities\index.js:7
bot.user.setActivity("Hello", {type: "STREAMING", url:"https://twitch.tv/bogscam"});
^

ReferenceError: bot is not defined
at Object.<anonymous> (C:\Users\User\Desktop\BOGSCAMs Ultities\index.js:7:5)
at Module._compile (internal/modules/cjs/loader.js:1137:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
at Module.load (internal/modules/cjs/loader.js:985:32)
at Function.Module._load (internal/modules/cjs/loader.js:878:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47

#

I have a test file that I have some notes

quartz kindle
#

Ok now were getting somewhere

earnest phoenix
#

ok

#

wdym

quartz kindle
#

You defined your client as client

#

So you have to use client everywhere

#

Not bot

faint prism
#

but he's referring to it as bot instead of client

cobalt spruce
#

yup$

quartz kindle
#

client.user.setActivity

opal plank
#

👀

cobalt spruce
#

bruh

faint prism
#

l0l

cobalt spruce
#

no advertising

heavy anchor
#

no ads

opal plank
#

bruh indeed

earnest phoenix
#

now this error

#

TypeError: Cannot read property 'setActivity' of null
at Object.<anonymous> (C:\Users\User\Desktop\BOGSCAMs Ultities\index.js:7:17)
at Module._compile (internal/modules/cjs/loader.js:1137:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
at Module.load (internal/modules/cjs/loader.js:985:32)
at Function.Module._load (internal/modules/cjs/loader.js:878:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47

cobalt spruce
#

@earnest phoenix try setGame

sonic lodge
#

you need to place that code in your bot's ready event

quartz kindle
#

That means its trying to set activity before the client is ready

cobalt spruce
#

Bruh

sonic lodge
#

like how you have an event for messages client.on('message', ..., make one for the ready event: client.on('ready', ...

earnest phoenix
#

const Discord = require('discord.js');

const client = new Discord.Client();

console.log('Logged in as BOGSCAMs Ultities!')
client.user.setActivity("Hello", {type: "STREAMING", url:"https://twitch.tv/bogscam"}); 

client.on('message', msg => {
if (msg.content === 'b!ping') {
msg.reply('Pong!');
}
});

client.login('MY TOKEN');

quartz kindle
#

Stop posting your token lmao

earnest phoenix
#

Lmfao

#

By mistake

opal plank
cobalt spruce
#

its just client.on('ready',

quartz kindle
#

You should probably reset it

faint prism
#

It says "MY TOKEN" though

quartz kindle
#

There are bots who snipe tokens

faint prism
#

Now that is useful, wow

earnest phoenix
#

What should I delete to fix it?

quartz kindle
#

Do you know what an event is?

earnest phoenix
#

Nope not yet

drifting wedge
#

how do i send a custom emoji?

quartz kindle
#

.on("something")

drifting wedge
#

as a bot

#

i have the id

quartz kindle
#

That would be a something event

earnest phoenix
#

So...?

quartz kindle
#

As you can see, you have an event on your code, right? Can you tell me which event do you have?

drifting wedge
#

me?

quartz kindle
#

No, bog

faint prism
#

no

earnest phoenix
#

Idk

#

What event I have

sonic lodge
#

hint: client.on('message', msg => {

earnest phoenix
#

TypeError: Cannot read property 'setActivity' of null
at Object.<anonymous> (C:\Users\User\Desktop\BOGSCAMs Ultities\index.js:7:13)
at Module._compile (internal/modules/cjs/loader.js:1137:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
at Module.load (internal/modules/cjs/loader.js:985:32)
at Function.Module._load (internal/modules/cjs/loader.js:878:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47\

#

Now this is the error

quartz kindle
#

.on("something") would be a something event

#

.on("a") would be an a event

#

Which event do you have?

#

Or are you not interested in learning?

rocky hearth
#

Tim how can I record audio of all members present in a voice channel in a single file?

faint prism
#

I'm sure there is an audio stream you could write to a file

rocky hearth
#

Audio Stream??

faint prism
#

yeah, like a bytestream

quartz kindle
#

Check connection.receiver.createStream

drifting wedge
#

how do i send emoji

#

like a custopm emoji

#

i did the /emojiname thing

rocky hearth
#

Yeah, that only records a single user in one file

drifting wedge
#

but it doesnt send the emoji

faint prism
#

Hm

quartz kindle
#

@drifting wedge your bot needs to be in the same server where the emoji comes from, and also have permissions to use external emojis

fringe axle
drifting wedge
#

well it does

#

it has admin

#

so it should have external emoji

#

omega lul

#

im dumb

rocky hearth
#

Ik I could have multiple receiving streams, but how can I merge them in one file?

drifting wedge
#

1 sec

faint prism
#

If you can only get streams for each individual user... You'd have to save/cache them and for merging you'd probably want to look into a library to help with that, then output to a single file @rocky hearth

quartz kindle
#

@rocky hearth you need to look into media libraries on npm that can combine/merge media streams

#

Media streams are encoded and encrypted in various ways so you cant simply write them to the same file, they have to go through a media processor to be properly transcoded and merged

drifting wedge
#

how do i get who created a channel

#

its event

dire obsidian
#

@fringe axle you use commando right?

faint prism
#

how do i get who created a channel
@drifting wedge That'd be in the audit log, yeah?

fringe axle
#

Yes

plucky harness
#

any1 uses PIL for python?

drifting wedge
#

@drifting wedge That'd be in the audit log, yeah?
@faint prism id think so

#

but its in the channel create evebt

#

{member} doesnt work lmao

quartz kindle
#

@drifting wedge there is a channelCreate event, but the event doesnt give you the creator

dire obsidian
#

Yes
Just add a args

faint prism
#

if the event is fired, try reading the audit log maybe if the event doesn't include the creator

dire obsidian
#

Look at the guide too

fringe axle
#

Just add a args
@dire obsidian means?

drifting wedge
#

how would i read it?

faint prism
#

dunno, might be in the docs if you can

dire obsidian
#

@fringe axle the guide bro

fringe axle
#

Send link

dire obsidian
#

Read it, is on GitHub

fringe axle
#

Okay

dire obsidian
rocky hearth
#

How can I end a readable stream, manually, causing the event to be also triggered??

fringe axle
quartz kindle
#

@rocky hearth stream.destroy()

rocky hearth
#

But using this, the end event doesn;t gets triggerred

#

@fringe axle Show code, I also use Commando

quartz kindle
#

use the close event instead of end

fringe axle
#

Wait, new code is coming

#

New one

rocky hearth
#

You're not using Commando to its full potential

fringe axle
#

I do

rocky hearth
#

**NO **

fringe axle
#

With this.client

rocky hearth
#

Ur run method could be very small.

#

nvm

steady anchor
#

how can I check if my bot has the permission to send a message in a specific channel?

faint prism
#

You can get the permissions for any users, then just compare it

#

a JS dev might be able to share the insight on it. But it's in d.js docs assuming that's what you're using

dire obsidian
faint prism
quartz kindle
#

Channels have a .permissionsFor(user) method

knotty quartz
#

How do you make a premium database so only premium members can use it?

quartz kindle
#

A database is a tool, a means to an end. What kind of premium features do you want to offer?

faint prism
#

uh

quartz kindle
#

Youll have to do that at the code level, it dpesnt have anythong to do with databases

faint prism
#

How do you make a premium database so only premium members can use it?
@knotty quartz User's should not have access to the db directly

#

any interaction should be via the logic you define

knotty quartz
#

I mean I got confused on making one for premium commands like role all and premium stuff.

maiden mauve
#

you mean you need a user database with privileges flagged?

#

code says "can this user use this command" -> check db -> yes or no

knotty quartz
#

Like command that only work with my server premium role.

faint prism
#

I mean I got confused on making one for premium commands like role all and premium stuff.
@knotty quartz Why not just have a boolean field in you db called "IsPremium" ?

#

And check that before executing a premium command

maiden mauve
#

that's pretty easy to do for 1 role on 1 server

faint prism
#

yeah, or check if they have a role, either or

#

I saw someone who used roles in their support server for premium status. But tbh another database field is a better approach

maiden mauve
#

roles are a bit of a pain to start working with, but extensively covered in api

knotty quartz
#

that's pretty easy to do for 1 role on 1 server
@maiden mauve It keeps saying error in code so I deleted the base.

maiden mauve
#

if you are familiar with how to use a database, then like Auger said it's just a boolean

faint prism
#

I deleted the base
waitWhat

maiden mauve
#

if someone actually paid, they need the role on every server your bot is in

#

there are many ways to solve this problem

faint prism
#

or check the support server for the role every time

#

But like i said, the db field is a good approach

maiden mauve
#

but depending on where the "access to premium" comes from (guessing a website) you would need a database between HTTP and Discord

knotty quartz
#

okay thanks

maiden mauve
#

if your just making this for fun on your own server, a specific role id is what you want

#

process command

check user role
exit structure if false

knotty quartz
#

Okay now I need to try to get the ban command working normally if I make a mistake my hhost dsiables the bot but I made a mistake in ban so it not working.

cobalt spruce
#

@knotty quartz sad

#

man use VS code

#

first

#

before u host

faint prism
#

Don't test in prod

knotty quartz
#

Don't test in prod
@faint prism I am using my rtesting bot so it doesnt go straight on the main bot.

faint prism
#

That works

knotty quartz
#

That a kick command tho that dopes work.

summer torrent
#

pls use hastebin

#

to share code snippets

knotty quartz
#

Okay. I will go try make a ban command.

fierce arch
#

Would it be against the rules to give to allow myself access to change the prefix of the bot in a server regardless of my perm as the owner?

faint prism
#

Not a bad code snippet

misty sigil
#

Would it be against the rules to give to allow myself access to change the prefix of the bot in a server regardless of my perm as the owner?
@fierce arch no

#

at least not afaik

#

it’s not like a ban command or nothing

fierce arch
#

Nah

misty sigil
#

I have it

fierce arch
#

Just mainly for botlists so I can make it different here so it won't be a common prefix

knotty quartz
#

Which one of you care to help with my ban command?

misty sigil
#

I can give some docs

hazy sparrow
#

guys is it .hasPermission() or permission.has() i forgot

knotty quartz
#

I have a scripty I just need to know what part to change to make it ban

hazy sparrow
#

d.js btw

misty sigil
#

.permissions.has() iirc

#

I have a scripty I just need to know what part to change to make it ban
@knotty quartz instead of <member>.ban use <member>.kick

earnest phoenix
#

.permissions.has() iirc
@misty sigil This.

misty sigil
#

wait other way

#

sorry

hazy sparrow
misty sigil
#

permissions

#

not permission

hazy sparrow
#

oh

drifting wedge
#

how do i get a server~s emojis:

#

like the emoji list

hazy sparrow
#

is it m.delete(5000) or something else i forgot

misty sigil
#

m.bulkDelete

drifting wedge
#

is it m.delete(5000) or something else i forgot
@hazy sparrow message_delete=15

cinder patio
#

<Guild>.emojis returns a collection with the guild's emojis, mapped by their ID

drifting wedge
#

deletee after 15 secs

misty sigil
#

use an if statement

hazy sparrow
#

no i want to delete the message sent by the bot after 5 seconds

#

@drifting wedge

drifting wedge
#

<Guild>.emojis returns a collection with the guild's emojis, mapped by their ID
@cinder patio does it send the emoji

#

or the id

#

@earnest phoenix

cinder patio
#

0Exe, which library are you using?

drifting wedge
#

whats up

#

py @cinder patio

misty sigil
#

What

#

use an if statement

#

to test for content

wooden ember
#

it have a problem
@earnest phoenix you need brackets when you set the token

drifting wedge
#

wut language?

#

and what error

misty sigil
#

@earnest phoenix you need brackets when you set the token
@wooden ember no you don’t

wooden ember
#

const token = ('token here')

misty sigil
#

your message event is not closed

#

close it with a }

wooden ember
#

that too

misty sigil
#

const token = ('token here')
@wooden ember no

steady anchor
#

How can I check if some has the permission SEND_MESSAGES. I have the Number (it was a bitfield) 104318529?

misty sigil
#

How can I check if some has the permission SEND_MESSAGES. I have the Number (it was a bitfield) 104318529?
@steady anchor .has()

#

<permissions>.has("SEND_MESSAGES")

drifting wedge
#
@client.command()
async def emojis(ctx):
    await ctx.send('<Guild>.emojis')```
#

so this?

misty sigil
faint prism
#

@earnest phoenix It literally says you're missing a closing }

misty sigil
#

Close the message event

cinder patio
#

Habviel, do you ONLY have the number and nothing else? If you are using discord.js, you can instantiate the Permissions class to work with the bitfield easily

drifting wedge
#

delete it

faint prism
#

@slender thistle token leak

drifting wedge
#

@earnest phoenix

#

REGENB TOKEN

#

NOWW

#

DO IT

#

DELETE MESSAGE AND REGEN TOKEN

earnest phoenix
#

anyone giving token

drifting wedge
#

@earnest phoenix did u regen token?

#

ok good

misty sigil
#

so

steady anchor
#

<permissions>.has("SEND_MESSAGES")
@misty sigil welcomechannel.permissionsFor(member.guild.me).has('SEND_MESSAGES')?

misty sigil
#

Close the message event

#

@misty sigil welcomechannel.permissionsFor(member.guild.me).has('SEND_MESSAGES')?
@steady anchor that should work yes

steady anchor
#

nope xd

misty sigil
#

ah

steady anchor
misty sigil
#

ah

#

SEND_MESSAGES is invalid?

drifting wedge
#

how do i send server emojis?
like send the emoji picture

#

not the ids

hazy sparrow
#
message.channel.send(`Successfully purged **${deleteAmount}** messages.`).then(m=>{m.delete(5000)})

its not deleting after 5 secs

steady anchor
#

SEND_MESSAGES is invalid?
@misty sigil the bot has not the permission send messages. how can I check if the bot has the permission or not?

drifting wedge
#

what libraty

#

ah dont know sorry

misty sigil
#

if(!welcomechannel.permissionsFor(member.guild.me).has('SEND_MESSAGES'))return

#

or something

cinder patio
#

EAZY BLACK you have a syntax error

misty sigil
#

@earnest phoenix I’ve told you

#

close it with a }

hazy sparrow
#

@earnest phoenix you forgot a }

cinder patio
#

Not only a }

restive furnace
#

thing(pars, (pars) => {});

misty sigil
#

Below the code

#

Not only a }
@cinder patio oh yea a ) too

drifting wedge
#

how do i send a servers emojis?

misty sigil
#

guild.emojis

drifting wedge
#

i have that