#development

1 messages · Page 1390 of 1

unborn ridge
#

const emoji = guild.emojis.cache.first();

#

i have done this

#

it tells info of random emoji

rare plume
#

Yeah

#

Like i said i just split out the id from the base emoji name and get the id from the cache

unborn ridge
#

somebody can help?

opal plank
#

first() doesnt return a random

#

it returns the first one

#

if you do that twice the outcome will be the same

earnest phoenix
#

i want to make &startBingo [time] command and i want to wait [time] and start bingo but what if user wants to stop bingo so i need to make &stopBingo and i dont know how to do that can someone help

lyric mountain
#

native emojis use unicode notation

rare plume
#

Or with a

#

I know but for a emojiinfo you don't really need nativ emojis

lyric mountain
#

but if you pass a normal emoji wont it error?

rare plume
#

If you check it first it won't

#

But like i said i am also looking for a new way to detect emojis in messages

#

Mine is also shit

#

For now it works but a improvment would be also good

lyric mountain
#

<(a:|)\w+:\d+>

#

actually, <(a:|)(\w|\d)+:\d+> would be better

#

since you can have numbers in emote's name

rare plume
#

Thanks

sudden geyser
#

@lyric mountain the a should be an optional, because the : prefix exists on all emojis. Like, /<a?:\w+:\d+>/

lyric mountain
#

oh I forgot ? exists

#

<a?:(\w|\d)+:\d+> then nvm, just noticed \w also matches numbers

pale vessel
#

maybe /<a?:\w+:(\d{17}|\d{18})>/

sudden geyser
#

yeah I was about to point that out lol

#

or just \d{17,19}

lyric mountain
#

ain't the id range unnecessary?

#

who do I ping?

umbral zealot
#

@green kestrel since you're online, here's some spam above by @fair crypt

fair crypt
#

Mehh

lyric mountain
#

eject red

fair crypt
#

Im not the impostor

umbral zealot
#

No just a lame spammer.

pale vessel
#

Brain has high ping

fair crypt
#

Im not spamming im real im not a.i.

earnest phoenix
green kestrel
#

byeeee

#

thanks Heevie.Codes

lyric mountain
#

"Red was an impostor"

#

@earnest phoenix your flag (probably permission flag) is either corrupted (do not do arithmethic stuff with flags) or invalid

earnest phoenix
#

🤔

#

but, when i do channel.setName('a')

#

😔

lyric mountain
#

error ain't there

#

show what else you're doing around that part

tranquil grove
#

Maybe the name is too short

#

Or it's probably an issue with ur other code

earnest phoenix
sudden geyser
#

Can you show the stacktrace

earnest phoenix
#

what is "stracktrace"?

worthy pine
#

the error

sudden geyser
#

at <x>
at <y>
at <z>
...

#

Your eval command probably won't show it

earnest phoenix
sudden geyser
#

okay the stacktrace has nothing helpful in it

earnest phoenix
#

😔

sudden geyser
#

all of it points to the library but none of your code

worthy pine
#

what are you trying to do with the eval command?

sudden geyser
earnest phoenix
#

but, the channel is now "a"

#

but idk why I get the error

worthy pine
#

maybe its something with your eval cmd

earnest phoenix
#

🤔

#

i dont think is my eval cmd

#

because in the event ready i put "channel.setName('Guilds: '+client.guilds.cache.size)" with an interval of 5m and i get the same error

prime glacier
#

Traceback (most recent call last): File "main.py", line 16, in <module> bot.run(os.environ.get("TOKEN"))

sudden geyser
#

where's the error

#

There should be more to the stacktrace

brave sky
#

Who knows how to hack?

sudden geyser
#

/hack @gilded plank

#

boom, luca is no more

midnight blaze
#

@brave sky I can print "hello world" in 3 languages

#

does that count as hacking?

brave sky
#

Lol

tribal siren
#

what does it want from me

midnight blaze
#

message.mentions.channel.first() sucks anyways

#

wouldnt use it

tribal siren
#

what can i do instead then

midnight blaze
#

create your own function. slice <@ > from the argument and then use the id

prime glacier
tribal siren
#

OH I GOT IT

#

lmao

jovial nexus
#

i want to do a bot that sends a message for each hour, how can i do that? I mean, when its 2:00 pm i want it to say "Its 2 pm"

#

for example

#

I need to check it every second

sudden geyser
#

Keep in mind timezones differ.

#

And what language are you using

earnest phoenix
#

@sudden geyser the error is because i use the v8

#

xd

prime glacier
#

can someone solve my error ⤴️

earnest phoenix
#

Can someone please help me with this problem?
I'm trying to install dblapi.js with npm
but this happens
Could not install from "dblapi.js" as it does not contain a package.json file.

quartz kindle
#

try installing from git

#

npm install top-gg/dblapi.js

earnest phoenix
#

So ill just copy and paste this what you sent me?

#

didnt work

bronze fable
#

why are events not working, wtf

primal garden
#

Hey all 🙂

#

So i've been working on a bot and have some code here but i'm not sure on how to make it as a embed

bronze fable
#

what lang

primal garden
#

``const Command = require("../../structures/Command.js");
const { MessageAttachment } = require("discord.js");
const { MessageEmbed } = require("discord.js")

class Achievement extends Command {
constructor(...args) {
super(...args, {
description: "Achievement Get!",
cooldown: 3,
cost: 5,
usage: "achievement [@user] <text>"
});
}

async run(msg, [user, ...args]) {
user = await this.verifyUser(msg, user, true)
.catch(() => {
args.unshift(user);
return msg.author;
});

if(!args.length) return msg.send("Hey Friend, You need to provide some text.");

const text = args.join(" ");

if(text.length > 21) return msg.send("Sorry Friend, Text cannot be longer than 21 characters.");

const img = await this.client.img.achievement(user.displayAvatarURL({ size: 64, format: "png" }), text);

  return msg.send(new MessageAttachment(img, "achievement.png"));

}
}

module.exports = Achievement;``

#

@bronze fable Discord.js

jovial nexus
#

Keep in mind timezones differ.
@sudden geyser its only for 1 city and i am using node.js

bronze fable
#

misunderstood

primal garden
#

yeah 😄

sudden geyser
#

@jovial nexus I mean the user may live in another timezone and see something different

jovial nexus
#

its for like 100 people

#

all from the same country

sudden geyser
#

okay

#

what language are you using

jovial nexus
#

node.js

primal garden
#

@bronze fable Do u actually know how to do it 🙂

bronze fable
#

send embed?

jovial nexus
#

i have the hour with const Hour = date.toLocaleString().split(" ")[1] but i want it to check every second if Hour = 12:00:00 for example

bronze fable
#

what exactly is the problem

earnest phoenix
#

lol

primal garden
#

what exactly is the problem
@bronze fable I want to make it send as a embed

#

not just a regular messgae

#

``const Command = require("../../structures/Command.js");
const { MessageAttachment } = require("discord.js");
const { MessageEmbed } = require("discord.js")

class Achievement extends Command {
constructor(...args) {
super(...args, {
description: "Achievement Get!",
cooldown: 3,
cost: 5,
usage: "achievement [@user] <text>"
});
}

async run(msg, [user, ...args]) {
user = await this.verifyUser(msg, user, true)
.catch(() => {
args.unshift(user);
return msg.author;
});

if(!args.length) return msg.send("Hey Friend, You need to provide some text.");

const text = args.join(" ");

if(text.length > 21) return msg.send("Sorry Friend, Text cannot be longer than 21 characters.");

const img = await this.client.img.achievement(user.displayAvatarURL({ size: 64, format: "png" }), text);

  return msg.send(new MessageAttachment(img, "achievement.png"));

}
}

module.exports = Achievement;``
@primal garden

bronze fable
#

1 min

#

u are just sending image

#

why dont u use normal embed, less complicated

worthy pine
sudden geyser
#

What I think you could do is Date.now() % (1000 * 60 * 60), which should get the time for the hour in milliseconds. You'll use this so you can calculate how far into the hour you are.

So, then you'll use the ms in a setTimeout(() => {...}, ms), so if it was 8:30 and hit 9, it would run that timeout function. After that, you'll set an interval inside the setTimeout so it can be in order to run every hour.

For example: ```js
setTimeout(() => {
console.log("X")

setInterval(() => {
console.log("Runs every hour.")
}, 1000 * 60 * 60)
}, Date.now() % (1000 * 60 * 60))```
There is probably a more idiomatic way of handling this, but this is the one that came to my mind. Searching on Mozilla's developer site for Date would probably show you a function to get the current time (in hour) so you can say "It's X:00 AM/PM".

#

@jovial nexus

earnest phoenix
#

ok this might be a stupod question but how do i make a command that manipulates a image or uploads an image

worthy pine
#

manipulates?

earnest phoenix
#

like adding a overlay

worthy pine
#

use canvas

earnest phoenix
#

canvas?

bronze fable
#

i think its native

worthy pine
earnest phoenix
bronze fable
#

u didnt

worthy pine
#

^^^

earnest phoenix
#

oh

worthy pine
#

use pillow then

earnest phoenix
#

i mean from a API

worthy pine
#

there are alot of apis out there

jovial nexus
#

@sudden geyser thx for that, what i did is ```js
function notify() {

const TiempoAhora = new Date()
const Dia = TiempoAhora.toDateString().split(" ") [2]
const Hora = TiempoAhora.toLocaleString().split(" ")[1]

if(Hora == "15:18:30") console.log("a")

}
setInterval(notify, 1000);```

earnest phoenix
sudden geyser
#

that runs every second

jovial nexus
#

yup

sudden geyser
#

There are probably more efficient ways of handling that.

jovial nexus
#

mabye node schedule

worthy pine
#

@earnest phoenix add a param to it

sudden geyser
#

or what I was suggesting, where you calculate how many milliseconds until the next hour then start your interval for every hour

jovial nexus
#

why do you say that is not eficient? it uses a lot of ram?

earnest phoenix
#

so according to the API docs (for that api) i need a avatar param and how would i add that to my code

sudden geyser
#

It's calling the function when it doesn't need to.

#

So it's a waste of usage yes

jovial nexus
#

ok i will see it thanks a lot :D

worthy pine
#

@earnest phoenix like this

https://some-random-api.ml/canvas/wasted?avatar=imgurl

replace imgurl with the image url

earnest phoenix
#

but i want it so when a person uploads a Image file it'll use that to add the overlay

worthy pine
#

await the message?

earnest phoenix
#

oh

#

i dont really know alot of python

worthy pine
#

then learn more about it

chrome garden
#

How can I use an async method in Python Flask?

Class ...:
  def get(self, name):
        data = await self._fetch_data(name)
        return {
            "result": data
        }```
stoic girder
#

I need fetchAllMembers for stuff like guild.members.cache.find to work properly at all times?

sudden geyser
#

You don't need it, but it can make it more accurate.

stoic girder
#

I did some tests and sometimes it wouldn't find the member by it's username for example.

worthy pine
#

but fetchAllMembers can make your bot super slow in startup

restive furnace
#

unless you enable the intent

stoic girder
#

Intent verification is separate from the "regular" bot verification?

restive furnace
#

i literally waited 10 minutes in decent-szied server for my bot to fetch every member without the intent, but with it the fetch took only like 2 secs.

#

Intent verification is separate from the "regular" bot verification?
not sure, but what I heard it's the same, just it asks bit more questions.

worthy pine
#

Intent verification is separate from the "regular" bot verification?
@stoic girder you could do it both at the same time

#

theres an option there

stoic girder
#

Well my bot is in like 200 servers already.

worthy pine
#

on what intents you want the bot to get whitelisted

stoic girder
#

If I turn on the intent it won't function properly until it gets approved?

restive furnace
#

contact discord support and verify the bot if you haven't already

stoic girder
#

on what intents you want the bot to get whitelisted
@worthy pine Server members intent I assume

worthy pine
#

yes

restive furnace
#

contact discord support and verify the bot if you haven't already
do this then

stoic girder
#

Okie dokie

#

Thanks

hollow sedge
#

@chrome garden add async before def

stoic girder
#

@restive furnace I go to the regular support contact page?

#

Or there is some developer one?

#

I don't see any dev related category.

restive furnace
#

Regular, but select the category as closest as possible to (bot) development

stoic girder
#

hmhm

jovial nexus
#

how can i get 1 data of all the users in a mongodb database?

#

Like i have 100 users with this data: ```
id: "'49820429420939"
group: 1
message: true

earnest phoenix
#

hey

#

how can i make my bot edit a message after sending it?

chrome garden
#

@hollow sedge Doesnt work

rare plume
#

how can i get 1 data of all the users in a mongodb database?
@jovial nexus I am not sure but try <Schema>.find({ group: 1 });

#

Or just one use findOne

stark abyss
#

@earnest phoenix

    message.channel.send(editEmbed).then(msg => {
      editEmbed.setTitle("edited TITLE");
      msg.edit(editTimer)}```
#

That's how I did it with an embed

earnest phoenix
#

i already solved my problem xd

stark abyss
#

awesome pepeHappy

earnest phoenix
#

but how can i make my bot wait about 2 or 3 seconds before editing the message?

worthy pine
#

setTimeout

carmine summit
#
//Do stuffs
}, 3000)```
earnest phoenix
#

oh right

#

but

#

how do i do that

carmine summit
#

Await the send

#

Uh

earnest phoenix
#

how, i'm new at development xD

sudden geyser
#

the settimeout example

stoic girder
#

put the msg.edit inside setTimeout

earnest phoenix
#

oh

sudden geyser
#

in the block () => {...}, you'll edit the message in there

carmine summit
#
setTimeout(function(){
msg.edit()
}, 3000)```
earnest phoenix
#

guys

blissful coral
#

Then make it a async function

earnest phoenix
#

how xd

sudden geyser
#

You need to add async to the function signature.

#

async function() {...} or async () => {...}

earnest phoenix
#

like this?

#

is that ok?

blissful coral
#

Yes

earnest phoenix
#

the same error...

blissful coral
#

Did you save it

earnest phoenix
#

yep

umbral zealot
#

It's actually not possible for that error to happen with that code 😕

stable nimbus
#

Odd.

blissful coral
#

Yeh lol

earnest phoenix
#

i'll use my another way to edit the message

#

and it works

carmine summit
#
msg.edit()
}, 3000))```
earnest phoenix
#

ow

#

thx

hazy sparrow
#

how do i made a field inline in .addField()? i only know how to do it in .addFields() :/

quartz kindle
#

you could just check the docs

earnest phoenix
#

.addField('Test', 'this is a test')

hazy sparrow
#

oh yeah sorry and thanks

#

so umm

#

.addField("Title", "other stuff", { inline = true }

#

Correct?

quartz kindle
#

nope

earnest phoenix
#

nope

hazy sparrow
#

inline: true?

earnest phoenix
#

that inline may not stay there

quartz kindle
#

when you see a value being inside [] in documentatino

earnest phoenix
#

.addField("Title", "other stuff")

quartz kindle
#

that means that value is optional

earnest phoenix
#

wait

#

title?

quartz kindle
#

so that means you can do either .addField(name,value,inline) or .addField(name,value)

earnest phoenix
#

for the title you may use .setTitle('Test')

hazy sparrow
#

lemme try again

quartz kindle
#

then in the parameter list, you see what type the values are

#

name is a string
value is a string
inline is a boolean

hazy sparrow
#

.addField("Title", "other stuff", inline)

#

correct?

quartz kindle
#

inline is a boolean

lethal grail
#

module.exports = {
name: "kick",
usage: "kick <@user> [reason]",
description: "Kick a user from the guild.",
execute: async (client, message, args) => {
    
        let user = message.mentions.users.first();
        let reasonkick = message.content.split(' ').slice(2).join(' ');
        let guild = message.guild;
        let memberkick = message.guild.member;
    
    if(!message.member.hasPermission("KICK_MEMBERS")) return message.channel.send("You Require `KICK MEMBERS` Permission to Execute this Command")
    
     if (message.mentions.users.size < 1) {
            return message.channel.send('You need to mention someone to kick!');
        }
    
     if (!reasonkick) {
            reasonkick = "No Reason Given"
        }
    
    if (!message.guild.member(user).kickable) {
            return message.channel.send("That Member couldn't be kicked due to role hierarchy");
        }
    
    message.guild.member(user).kick();
    
    let embed = new Discord.MessageEmbed()
    .setTitle("User Was Successfully Kicked")
    .setDescription(`${user.username}#${user.discriminator} was kicked by ${message.author.username}`)
    .addField(`Reason :-`, `${reasonkick}`)
    .setColor("RANDOM")
    message.channel.send(embed)
    
     let DmEmbed = new Discord.MessageEmbed()
    .setDescription(`You were Kicked from ${guild} for: ${reasonkick}`)
    .setColor("RANDOM")
    user.send(DmEmbed)
  }
}```
the command wont respond, no error in logs
quartz kindle
#

you know what a boolean is?

hazy sparrow
#

yeah i have vague memories of it

earnest phoenix
#

wait that's JS?

quartz kindle
#

a boolean is either true or false

lethal grail
#

wait that's JS?
@earnest phoenix yeah

earnest phoenix
#

i did my kick command different

#

xd

#

(My bot is on spanish)

lethal grail
#

im using a diffrent command handler

potent widget
#

same

cinder patio
#

Don't tell me you have more than one message listener

earnest phoenix
#

me?

arctic hare
#

lol

earnest phoenix
#

how can i made my bot send a channel message when it's added to a new server??

halcyon linden
#

@earnest phoenix

arctic hare
#

guildCreate event @earnest phoenix

earnest phoenix
#

¿?

halcyon linden
#

cual es el problema?

earnest phoenix
#

wut?

halcyon linden
#

yo te ayudo en español

earnest phoenix
#

DM

arctic hare
#

English please.

halcyon linden
#

Yeah, sorry

jovial nexus
#

if i have a dict like user[0] how can i make a variable for all the users inside the dict?

cinder patio
#

Use a loop

jovial nexus
#

how?

cinder patio
halcyon kite
#

Hi so I made a mute command but it auto revokes the mute, I have been testing timers with this and I still cant seem to figure it out, can somebody help me with this? heres the code:

quartz kindle
#

wdym revokes the mute

halcyon kite
#
    user.roles.remove(role)
      message.channel.send(`${user} is now unmuted bois`)
  }```
#

like

#

here I will show screen shot

sudden geyser
#

Where's the second argument (how long to wait in ms)

halcyon kite
#

ignore the invaild thing

earnest phoenix
#

@halcyon kite your time out is probably a wrong number

quartz kindle
#

so it unmutes them immediately? did you add the time to wait in the setTimeout?

hollow sedge
#

lol you're telling them it was invalid 3 times

earnest phoenix
#

Error: input stream: This video is unavailable
at downloadFromInfoCallback (C:\Users\poronga\node_modules\ytdl-core\lib\index.js:76:26)
at C:\Users\poronga\node_modules\ytdl-core\lib\index.js:18:5
at processTicksAndRejections (internal/process/task_queues.js:97:5)

#

🤝

tepid gate
#

All my hard work making sure everything lined up and I get beat by a star FeelsBadEh

blissful fiber
#

ok im making a discord bot with c# in vs and i want to to something where some one will say thx @blissful fiber and it will add i helpfulness to my profile but idk how to do that save data for the user like it would add +1 helpfulness to the profile

#

if you guys can help

earnest phoenix
#

ef core + sqlite if you're small scale

#

efcore + postgres if you're large scale

#

whast this

pale vessel
#

you tell me

earnest phoenix
#

develment

#

or so

#

learning the server

#

Hello, a question, the guild member remove event records the suppress of users?

#

Like what

#

?

warm crater
#

i have a question i went to create my bot and after completing everything i clicked send what do i do now?

earnest phoenix
#

client.on("guildMemberRemove", member =>{
const canal = member.guild.channels.cache.find(c => c.name === "left-userx");
if(!canal) return;
const embed = new Discord.MessageEmbed()
.setAuthor(member.user.username, member.user.displayAvatarURL({format: "png", dynamic: true}))
.setDescription(***<@${member.id}> bye dumbass***)
.setThumbnail(member.user.displayAvatarURL({format: "png", dynamic: true}))
.setColor(0x72473d)
.setFooter(siempre en nuestros corazones <@${member.id}>)
canal.send(embed);
});

#

this is an example

#

i have it in my bot

#

👍

#

@earnest phoenix

warm crater
#

my question not that my question is how i creat my bot i cliked to send and idk what i do

earnest phoenix
#

@earnest phoenix No me refería al código, y sí hablo español, pero me refería a que si detecta al purgar/suprimir miembros del servidor. Igualmente, gracias.

earnest phoenix
#

lol

young flame
#

ok so

#

this is my code and i'm trying to make a custom welcome message like thing but

#

kinda poggers

arctic hare
#

@young flame do u have privileged gateway intents?

earnest phoenix
#

that isnt relevant here

young flame
#

yes

#

@young flame do u have privileged gateway intents?
@arctic hare i do

agile lance
#

kinda poggers
@young flame If it cant find guild and is undefined, Try to log this: console.log(message.guild.id)

young flame
#

kk

agile lance
#

And tell me what it logs

#

And what is the db you’re using?

feral aspen
#

Probably quick.db

young flame
#

eh might use my own db

feral aspen
#

I prefer using MySQL! 🙂

slow trench
#

I also use mysql

agile lance
slow trench
#

Might switch to using postgresql

earnest phoenix
#

why are you giving pointless solutions

#

the error clearly says that the message is undefined for whatever reason

young flame
#

@agile lance it gave me the guild id

restive otter
#

1 guys have code for bot info ?

#

please

young flame
#

no

#

learn yourself

#

OHH

#

I'M DUMB

north birch
#

Guys im confused, when i usually push data in my db it store object like:

'Data1',
'Data2',
'Data3'
]```

But now my database, idk the reason, store data like this: 

```['Data1', 'Data2', 'Data3']```

And now i cant check if the db contain a specific data and broke like 30% of my bot commands
young flame
#

uh

#

what are you trying to store?

north birch
#

Strings, the name of the weap

young flame
#

Probably quick.db
@feral aspen no i had message.guild.id working but since i didnt have it like ```js
db.set(channel_${message.guild.id}, cArgs)

#

Strings, the name of the weap
@north birch wut

north birch
#

@north birch wut
@young flame The data is actually the name of the in game weapons

young flame
#

ok

#

send the code

north birch
#
  let author = db.fetch(`money_${message.guild.id}_${message.author.id}`)
        if (author < 5000) return message.channel.send('You dont have enough cash')
        db.push(`${message.author.id}_weapon`,'Weapon1');
        db.subtract(`money_${message.guild.id}_${message.author.id}`, 5000)
        message.channel.send(message.author.toString() + 'You buyed Weapon1')```
young flame
#

nope nm

#

nvm*

#

guild is still "undefined"

#
  let author = db.fetch(`money_${message.guild.id}_${message.author.id}`)
        if (author < 5000) return message.channel.send('You dont have enough cash')
        db.push(`${message.author.id}_weapon`,'Weapon1');
        db.subtract(`money_${message.guild.id}_${message.author.id}`, 5000)
        message.channel.send(message.author.toString() + 'You buyed Weapon1')```

@north birch uh what is weapon1

north birch
#

The name of the weapon
@young flame

molten yarrow
#

Moon is your code in message event?

young flame
#
let Weapon1 = db.fetch(`ect_${message.author.id}_ect` 1)
#

Moon is your code in message event?
@molten yarrow yeah

#

it is

restive otter
#

db is ?

#

quick.db?

north birch
#

Yes

young flame
#

just wont work

#

kinda poggers ngl

molten yarrow
#

what do u have in your index line 84

north birch
#
let Weapon1 = db.fetch(`ect_${message.author.id}_ect` 1)

@young flame Weapon1 is a string text not a var

restive otter
#

bruh

north birch
#

Yay error party

young flame
#

what do u have in your index line 84
@molten yarrow uhh

#

dis

molten yarrow
#

thats not a message event like u said

#

its guildMemberAdd

young flame
#

no the command is in the message event

molten yarrow
#

and has only bot and member prop normally

#

yeah but ur event giving the error

young flame
#

aH

#

idk

molten yarrow
#

change the line to:

client.on('guildMemberAdd', (bot/client, member) => {
young flame
#

oo

#

okay

restive otter
#

To have quick.db you need which application

young flame
#

just make a json.sqlite file

#

and then npm i quick.db

north birch
#

To have quick.db you need which application
@restive otter The windows built app idk how that is called lmao

young flame
#

bruh you only need json.sqlite lol

young flame
#

it can't make it on it's one so you get a build error

restive otter
#

@young flame

north birch
#

bruh you only need json.sqlite lol
@young flame To use npm install quick.db you get error if you dont have the windows build app

young flame
#

make a file called json.sqlite file

#

then try again

#

@young flame To use npm install quick.db you get error if you dont have the windows build app
@north birch it worked for me though?

#

it gave me the same error all i did was make a json.sqlite error and it worked

north birch
#

@restive otter try npm install --global windows-build-tools

solemn latch
restive otter
young flame
#

dev senpai???

#

your orangee

solemn latch
#

i know, its weird

molten yarrow
#

i was using it like this before intens @solemn latch

solemn latch
#

ah, i didnt know client was passed like that.

north birch
#

i know, its weird
@solemn latch Level up: Crook > Boss

young flame
restive otter
molten yarrow
#

but i think it depends on your event handler

young flame
#

i have a json.sqlite file

molten yarrow
#

@restive otter try npm rebuild

restive otter
#

I am really cursed

north birch
#

@restive otter Try closing all app that is reading from the bot folder and try again the command that i give you

young flame
#

probally

molten yarrow
#

and run terminal with admin rights maybe helps xD

restive otter
#

LOL

north birch
#

Well

#

npm install --global windows-build-tools@4.0.0 ?

restive otter
north birch
#

Damn

restive otter
#

Bruh

molten yarrow
north birch
#

Oh yeah you're right again

#

npm install --global --production windows-build-tools --vs2015

young flame
#

poggers again

restive otter
#

fg*

molten yarrow
#

like i said you dont have message there

north birch
#

Oh my gawd

young flame
#

hhhhhh

molten yarrow
restive otter
#

I'm noob or no?

young flame
#

i have the db setting it for the message.guil.id so other guilds can change it

north birch
#

Oh @restive otter i just notice that you're trying to install it in the system32

#

lmao

young flame
#

unless guild is in the member event

north birch
#

cd to your bot folder or in any folder that the system can write temp file @restive otter

restive otter
#

Yes

molten yarrow
restive otter
#

What ? @north birch

molten yarrow
#

run the terminal in your Bot root folder

young flame
molten yarrow
#

yeah

young flame
#

oh and sorry for the pings and stuff i'm a little slow

north birch
#

What ? @north birch
@restive otter Your pc was trying to install the windows build tool setup in the sys32, that why you get that error

molten yarrow
#

yeah i see it too now xD

north birch
#

lol

restive otter
molten yarrow
#

go to your bot folder

north birch
#

cd desktop

restive otter
molten yarrow
#

shift + right click and open power shell

north birch
#

if desktop isn't found then
cd onedrive
cd desktop

#

Listen to @molten yarrow that method it's faster

restive otter
#

commands for install???

north birch
#

@restive otter try npm install --global windows-build-tools
@north birch This

molten yarrow
#

is this your Bot folder?

young flame
north birch
#

is this your Bot folder?
@molten yarrow I guess not lmao

#

@restive otter cd in your bot folder

restive otter
young flame
#

@molten yarrow hHhHHHhHhHHhHh

north birch
#

@restive otter Your powershell is not administrator

restive otter
#

How do I open it in admin

molten yarrow
#

Moon try remove client and keep only member, maybe your handler dont have it idk xD

tranquil basin
#

UseCMDi am not a Professional (just a Suggestion)

young flame
#

i'm not using a command handler

north birch
#

We

Use CMD i am not a Professional (just a Suggestion)
@tranquil basin They're similiar for installing using npm

molten yarrow
#

yeah than try with only member

young flame
#

kk

restive otter
#

How do I open it in admin
@restive otter

molten yarrow
#

go to your Bot folder first

restive otter
north birch
#

@restive otter Run your powershell as administrator

cd 33769
cd Desktop
cd ALG

molten yarrow
#

press Fichier on top left side

#

power shell => power shell admin

north birch
#

power shell => power shell admin
@molten yarrow Yeah @restive otter

#

Use one of this two method

young flame
restive otter
#

tuto please

molten yarrow
#

thats weird xD
try console.log(member) on first line somewhere

restive otter
molten yarrow
#

press Fichier on top left side in your Bot folder than power shell
@restive otter

north birch
#

@restive otter try cd into user first

molten yarrow
#

im giving up soon xD

north birch
#

lmao

restive otter
#

OMG

#

!!!

warm crater
#

what is URL?

north birch
#

@restive otter if you dont know how to reach desktop with cd use tree to figure the way out

restive otter
#

go dead

#

..

north birch
#

Well..

hollow sedge
#

@warm crater a link

warm crater
#

of what

north birch
#

Why the fuck your powershell cant write on your bot folder

hollow sedge
#

Of anything @warm crater

warm crater
#

ok

north birch
#

@restive otter You need to figure out why your system console cant write in that folder, try closing app that are reading from that folder, turning off antivirus

warm crater
#

how i add commands in my bot?

#

don't have this option

north birch
#

@restive otter Dont give up lmao

hollow sedge
#

@restive otter if you're having that many problems you could just use https://repl.it/

rustic nova
sudden geyser
#

Do you need to run as admin

#

I was going to say sudo but this isn't unix

young flame
#
client.on('guildMemberAdd', async (member) => {
  console.log(member)
  let channel = db.get(channel_${member.guild.id}, channel);
  if(!channel) return;

  let msg = db.get(message_${member.guild.id}, msg)
  let image = db.get(image_${member.guild.id}, image)

  let embed = new Discord.MessageEmbed()
  .setColor("RANDOM")
  .setDecription(msg)
  .setImage(image)
  .setFooter(member.guild.name, member.guild.iconURL());

  channel.send(embed);
});
#

how doe

molten yarrow
#

what does member logs?

sudden geyser
#

did not mean to underline member*

young flame
#

ahhh

#

okay welp

#

brb

#

what soes member logs?
@molten yarrow abunch of stuff lmao

sudden geyser
#

anyway channel is probably not going to be a GuildChannel. Most likely a channel ID, so why are you trying to call channel.send(...) when channel is likely a string

hollow sedge
#

Which db are you using @young flame

#

seems like a weird setup

young flame
#

anyway channel is probably not going to be a GuildChannel. Most likely a channel ID, so why are you trying to call channel.send(...) when channel is likely a string
@sudden geyser i'm gonna make a thing so it makes the channel.id a name ig

#

idk

hollow sedge
#

You shouldn't need to add message_ and image_ before the thing

molten yarrow
#

its his key to find the values

hollow sedge
#

ik

#

Still shouldn't need it

molten yarrow
#

db saves like key, value pattern
otherwise he cant save multiple values to same guild.id

hollow sedge
#

IK

young flame
#

i need it because my good man

#

if i just save everything as a guild id

molten yarrow
#

i would change the db to better one tho

young flame
#

and i want to get a certain thing

#

it'll get everything in that guild id

hollow sedge
#

i would change the db to better one tho
@molten yarrow that's why I asked what the db was

young flame
#

so i put channel_ so it gets the channel from the guild id

#

well i accidentally deleted my db MoonSQL so i gotta use quick.db

north birch
#

@young flame My bad, before i didn't wrote the entire code:

if(args[0] == 'weapon1') {
        if(armi == 'Weapon1') {
        var armi2 = new db.table('weaps2')
        let author = db.fetch(`money_${message.guild.id}_${message.author.id}`)
        if (author < 5000) return message.channel.send('You dont have enoguh cash')
        armi2.push(`${message.author.id}_weapon`,'Radiciona di Radicia');
        db.subtract(`money_${message.guild.id}_${message.author.id}`, 5000)
        message.channel.send(message.author.toString() + ' You buyed Weapon1 (You have now 2')
        delete armi2
            } else {
        let author = db.fetch(`money_${message.guild.id}_${message.author.id}`)
        if (author < 5000) return message.channel.send('You dont have enough cash')
        db.push(`${message.author.id}_weapon`,'Radiciona di Radicia');
        db.subtract(`money_${message.guild.id}_${message.author.id}`, 5000)
        message.channel.send(message.author.toString() + ' You buyed Weapon1')
        }```
hollow sedge
#

YOUR DB??

young flame
#

yeah i made one?

molten yarrow
#

quick.db

hollow sedge
#

You made your own DB?

young flame
#

yes

hollow sedge
#

How did you accidently delete that lol

young flame
#

i was cleaning files and i uhhh

#

yk how it says like

#

downloads from 1 month ago?

#

i just clicked on that and deleted like 140 files

#

kinda poggers but now i wish i didn't lmao

#
member.guild.channels.cache.get(channel).send(embed)
#

gotta add that since it's a id

molten yarrow
#

yeah should work

hollow sedge
#

That's really confusing

#

Why was your db in downloads anyway

young flame
#

don't question it

#

i save everything to downloads

#

it's naturaL

#

or i copy it to downloads

#

WTF WAS THAT

hollow sedge
#

sounds like a terrible idea

#

use folders

slow trench
#

Yes please use folders

dense patio
#

does anyone know how to set a webhook to a user's avatar? (discord.js v12)
the following does not work:

message.author.avatarURL({ format: `png`, dynamic: true })
#

it's the right url but it isn't setting it

sudden geyser
#

How are you setting it in the webhook

dense patio
#

oh nvm i just made a dumb mistake

#

my bad

young flame
#

uH

#

uhh

sage bobcat
#

One message removed from a suspended account.

young flame
sage bobcat
#

One message removed from a suspended account.

young flame
#

hHhhHhhHhH

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

young flame
#

i dont use command handlers

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

young flame
#

regular formatting

sage bobcat
#

One message removed from a suspended account.

quartz kindle
#

well somewhere message is not defined

shadow crag
#

for reactions when i copy and paste \🍔 into visual studio code i get an error saying unknown emoji

sage orbit
#

hmm

young flame
sage orbit
#

lemme check sum for ya dude man

#

🍔

young flame
#

do i need like

sage bobcat
#

One message removed from a suspended account.

young flame
#

(member, message)

#

uh yeah

quartz kindle
#

there is no message on guildMemberAdd

sage bobcat
#

One message removed from a suspended account.

young flame
#

aH

sage orbit
#

\🍔

young flame
#

so message embed wouldn't work?

sage orbit
#

for reactions when i copy and paste \🍔 into visual studio code i get an error saying unknown emoji
@shadow crag language?

shadow crag
#

JavaScript

quartz kindle
sage bobcat
#

One message removed from a suspended account.

sage orbit
#

JavaScript
@shadow crag can i see the error?

shadow crag
#

yes

sage bobcat
#

One message removed from a suspended account.

young flame
#

lol

rustic nova
quartz kindle
#

its not the same lol

sage bobcat
#

One message removed from a suspended account.

quartz kindle
#

well yes, the language itself is the same

#

but you will have issues installing some modules like the error above

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

shadow crag
#
    at RequestHandler.execute (/home/pi/Desktop/Cheems/node_modules/discord.js/src/rest/RequestHandler.js:154:13)
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:32510) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:32510) [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.```
@sage orbit
quartz kindle
#

because a phone runs in a sandbox environment, you are technically not an admin in your phone, where on the pc you are the admin

sage bobcat
#

One message removed from a suspended account.

sage orbit
shadow crag
#

ok thank

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

north birch
#

When i try to store data in db it store like
[ 'Data1', 'Data2', 'Data3' ] and broke all my command to check if db contain a data, in fact normally it store data like
[
'Data1',
'Data2',
'Data3'
]

So a lot of my bot command broke

if(args[0] == 'weapon1') {
        if(armi == 'Weapon1') {
        var armi2 = new db.table('weaps2')
        let author = db.fetch(`money_${message.guild.id}_${message.author.id}`)
        if (author < 5000) return message.channel.send('You dont have enoguh cash')
        armi2.push(`${message.author.id}_weapon`,'Radiciona di Radicia');
        db.subtract(`money_${message.guild.id}_${message.author.id}`, 5000)
        message.channel.send(message.author.toString() + ' You buyed Weapon1 (You have now 2')
        delete armi2
            } else {
        let author = db.fetch(`money_${message.guild.id}_${message.author.id}`)
        if (author < 5000) return message.channel.send('You dont have enough cash')
        db.push(`${message.author.id}_weapon`,'Radiciona di Radicia');
        db.subtract(`money_${message.guild.id}_${message.author.id}`, 5000)
        message.channel.send(message.author.toString() + ' You buyed Weapon1')
        }```
quartz kindle
#

there is no difference between those

earnest phoenix
quartz kindle
#

thats discord's fault

rustic nova
#

discord's api is kinda going brr right now

sage bobcat
#

One message removed from a suspended account.

earnest phoenix
#

oh

#

well angeryBOYE

north birch
#

thats discord's fault
@quartz kindle Actually when happen like [Data1 Data2 etc] it broke all my command to check if that db contain that weapon

#

Soo

quartz kindle
#

then you did something wrong

#

there is absolutely no difference in the data itself if you're using it properly

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

quartz kindle
north birch
#

@north birch
tim wasnt replying to you, he was replying to #development message
@sage bobcat Oh LMAO Sorry guys

tulip ledge
#

When i try to store data in db it store like
[ 'Data1', 'Data2', 'Data3' ] and broke all my command to check if db contain a data, in fact normally it store data like
[
'Data1',
'Data2',
'Data3'
]

So a lot of my bot command broke

if(args[0] == 'weapon1') {
        if(armi == 'Weapon1') {
        var armi2 = new db.table('weaps2')
        let author = db.fetch(`money_${message.guild.id}_${message.author.id}`)
        if (author < 5000) return message.channel.send('You dont have enoguh cash')
        armi2.push(`${message.author.id}_weapon`,'Radiciona di Radicia');
        db.subtract(`money_${message.guild.id}_${message.author.id}`, 5000)
        message.channel.send(message.author.toString() + ' You buyed Weapon1 (You have now 2')
        delete armi2
            } else {
        let author = db.fetch(`money_${message.guild.id}_${message.author.id}`)
        if (author < 5000) return message.channel.send('You dont have enough cash')
        db.push(`${message.author.id}_weapon`,'Radiciona di Radicia');
        db.subtract(`money_${message.guild.id}_${message.author.id}`, 5000)
        message.channel.send(message.author.toString() + ' You buyed Weapon1')
        }```

@north birch Not to be mean or anything, I'm just saying but there are quite a bit of spelling mistakes in there

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

tulip ledge
#

thats true

#

I'm not a native speaker either

molten yarrow
#

arent u creating a new table with same name each time you run this command?

tulip ledge
#

I'm just saying there are quite a bit of spelling mistakes

molten yarrow
#

new db.table(weaps2")

north birch
#

they're probably not a native speaker
@sage bobcat You're right : )

#

Sorry about thatt

quartz kindle
#

they're italian

sage bobcat
#

One message removed from a suspended account.

north birch
#

Yeah

sage bobcat
#

One message removed from a suspended account.

north birch
#

Heyy

tulip ledge
#

no problem I'm just saying that imo I don't like bots that don't have proper spelling

quartz kindle
#

i understand italian because #allromanlanguagesarethesame

sage bobcat
#

One message removed from a suspended account.

quartz kindle
#

roman

#

they are not romantic

sage bobcat
#

One message removed from a suspended account.

quartz kindle
#

:^)

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

quartz kindle
#

im memeing lol

sage bobcat
#

One message removed from a suspended account.

quartz kindle
#

romance = romantic shit

#

the langs are not romantic

#

so roman it is

north birch
#

lol

quartz kindle
#

lol

young flame
#
client.on('guildMemberAdd', async (member) => {
  console.log(member)
  let channel = db.get(`wchan_${member.guild.id}`, wchan);
  if(!channel) return;

  let msg = db.get(`message_${member.guild.id}`, msg)
  let image = db.get(`image_${member.guild.id}`, image)

  let embed = new Discord.MessageEmbed()
  .setColor("RANDOM")
  .setDecription(msg)
  .setImage(image)
  .setFooter(member.guild.name, member.guild.iconURL());

  member.guild.channels.cache.get(channel).send(embed);
});
quartz kindle
#

what is wchan lol

young flame
#

uhh

#

dis

#
if(command === "set-wchan") {
    let permission = message.member.hasPermission("ADMINISTRATOR");

if(!permission) return message.channel.send("You are missing the permission `ADMINISTRATOR`")

 let wchan = args[0]
 
 if(isNaN(wchan)) return message.channel.send({ embed: { color: ('RANDOM'), description: ("You must provide a valid channel id first!") } });
     
 db.set(`wchan_${message.guild.id}`, wchan)
 
 message.channel.send({ embed: { color: ('RANDOM'), description: ("You have successfully set the welcome channel to <#" + wchan + ">") } });
  }
quartz kindle
#

db.get() doesnt have a second parameter

#

.set(key,value) value = .get(key)

young flame
#

ah so i dont need the last part?

#

@quartz kindle

tulip ledge
#

No

young flame
#

that would have been helpful an hour ago

#

lmao thanks doe

#

probally woulda removed the commmand entirely

tulip ledge
#

if you're getting/requesting data from the database you have to call using the key wich is wchan_${message.guild.id} in your case, the second parameter in .set is the value of the key wich will eventually be returned when using .get("key")

young flame
#

thanks Viggy

#

@tulip ledge CuddlePuppy

#

might have to make you my dev senpai

north birch
#

When i try to store data in db it store like
[ 'Data1', 'Data2', 'Data3' ] and broke all my command to check if db contain a data, in fact normally it store data like
[
'Data1',
'Data2',
'Data3'
]

So a lot of my bot command broke

if(args[0] == 'weapon1') {
        if(armi == 'Weapon1') {
        var armi2 = new db.table('weaps2')
        let author = db.fetch(`money_${message.guild.id}_${message.author.id}`)
        if (author < 5000) return message.channel.send('You dont have enoguh cash')
        armi2.push(`${message.author.id}_weapon`,'Radiciona di Radicia');
        db.subtract(`money_${message.guild.id}_${message.author.id}`, 5000)
        message.channel.send(message.author.toString() + ' You buyed Weapon1 (You have now 2')
        delete armi2
            } else {
        let author = db.fetch(`money_${message.guild.id}_${message.author.id}`)
        if (author < 5000) return message.channel.send('You dont have enough cash')
        db.push(`${message.author.id}_weapon`,'Radiciona di Radicia');
        db.subtract(`money_${message.guild.id}_${message.author.id}`, 5000)
        message.channel.send(message.author.toString() + ' You buyed Weapon1')
        }```

So any solution for this?

molten yarrow
#

like Tim typed above

[ 'Data1', 'Data2', 'Data3' ]
//and
[
'Data1',
'Data2',
'Data3'
]

is the same

north birch
#

like Tim typed above

[ 'Data1', 'Data2', 'Data3' ]
//and
[
'Data1',
'Data2',
'Data3'
]

is the same
@molten yarrow They're giving me problem btw, the first one has broke my equip command that check if database contain that specific weapon

molten yarrow
#

where do u check it?

north birch
#

Just using console.log, and when happen the first one case here, my equip command dont work

molten yarrow
#

why are u creating a new table

var armi2 = new db.table('weaps2')

and trying to delete it

delete armi2
north birch
#

why are u creating a new table

var armi2 = new db.table('weaps2')

and trying to delete it

delete armi2

@molten yarrow i was trying to delete var cause idk if it can cause problem with other one, cause there are like 3 of the command that i send

molten yarrow
#

huh?

#

than dont use var

#

use const or let

north birch
#
> if(args[0] == 'weapon1') {
>         if(armi == 'Weapon1') {
>         var armi2 = new db.table('weaps2')
>         let author = db.fetch(`money_${message.guild.id}_${message.author.id}`)
>         if (author < 5000) return message.channel.send('You dont have enoguh cash')
>         armi2.push(`${message.author.id}_weapon`,'Weapon1');
>         db.subtract(`money_${message.guild.id}_${message.author.id}`, 5000)
>         message.channel.send(message.author.toString() + ' You buyed Weapon1 (You have now 2')
>         delete armi2
>             } else {
>         let author = db.fetch(`money_${message.guild.id}_${message.author.id}`)
>         if (author < 5000) return message.channel.send('You dont have enough cash')
>         db.push(`${message.author.id}_weapon`,'Weapon1');
>         db.subtract(`money_${message.guild.id}_${message.author.id}`, 5000)
>         message.channel.send(message.author.toString() + ' You buyed Weapon1')
>         };```
```javascript
> if(args[0] == 'weapon2') {
>         if(armi == 'Weapon2') {
>         var armi2 = new db.table('weaps2')
>         let author = db.fetch(`money_${message.guild.id}_${message.author.id}`)
>         if (author < 5000) return message.channel.send('You dont have enoguh cash')
>         armi2.push(`${message.author.id}_weapon`,'Weapon2');
>         db.subtract(`money_${message.guild.id}_${message.author.id}`, 5000)
>         message.channel.send(message.author.toString() + ' You buyed Weapon2 (You have now 2')
>         delete armi2
>             } else {
>         let author = db.fetch(`money_${message.guild.id}_${message.author.id}`)
>         if (author < 5000) return message.channel.send('You dont have enough cash')
>         db.push(`${message.author.id}_weapon`,'Weapon2');
>         db.subtract(`money_${message.guild.id}_${message.author.id}`, 5000)
>         message.channel.send(message.author.toString() + ' You buyed Weapon2')
>         };```

For example
#

use const or let
@molten yarrow I can try but it wont fix the db problem

young flame
molten yarrow
#

i dont know quick.db tho
but im sure u dont need create a new table everytime you run a command

young flame
#

after 2 hours

#

@molten yarrow thanks dev senpai

molten yarrow
#

aaay gg :3

young flame
#

i s t g i almost gave up to

#

time for starboard

#

lol

north birch
#

i dont know quick.db tho
but im sure u dont need create a new table everytime you run a command tho
@molten yarrow If i dont use new before db.table it just take ALL the data from ALL commands from the new table, meaning that !money and !health will just ''reset''

young flame
#

i'm gonna cry starboard gonna take 4 hours with how slow i am

molten yarrow
#

that should not happen tho xD

north birch
#

that should not happen tho xD
@molten yarrow I know O.0

#

i'm gonna cry starboard gonna take 4 hours with how slow i am
@young flame Yesterday one guy just tested a nsfw command in a EventOnMessage, and his bot spammed 100+ Porn in over 80 Guilds LMAO

#

that should not happen tho xD
@molten yarrow I dont know what to do this commands are driving me crazy lmao

molten yarrow
#

let args = message.content.slice(prefix.length).split('/ +/g');

#

what does the error say?

#

and where do u see that the error is in the lines above?

#

the errorlog doesnt say anything

#

is there more above or below it?

quartz kindle
#

do node index.js instead of npm start

molten yarrow
#

probably cant run on your phone

quartz kindle
#

do ls

#

what does it show?

potent bloom
#

Do node .

#

You have an error

#

In packages i think 😶

quartz kindle
#

show your index.js

molten yarrow
#

was it working before?

#

and why is index huge if you have command handler? xD

potent bloom
#

I think you have error

molten yarrow
#

can u run "node ." to start it

potent bloom
#

In package

molten yarrow
#

can u show your package.json

#

only the scripts part is enough

#

yeah thats why

#

remove the ./ before index.js

#

"node index.js"

#

try now

#

should start atleast

#

what does the error says?

#

cant help without :3

#

100% the same? D

#

you can check the log stored in "/data/data/com.astrosohu/files/home/.npm/_logs/2020-11-16T21_39_13_798Z-debug.log"
maybe theres more

young flame
#

@young flame Yesterday one guy just tested a nsfw command in a EventOnMessage, and his bot spammed 100+ Porn in over 80 Guilds LMAO
@north birch LMFAO

#

poggers!

north birch
#

@north birch LMFAO
@young flame in the end his bot got removed from 10 guilds

young flame
#

damn

north birch
#

Lol

young flame
#

i would have been like yooo

#

that bot is poggers

molten yarrow
#

only this 10 were real, the others are Bot collecting server :3

young flame
#

now it's vibe time

#

only this 10 were real, the others are Bot collecting server :3
@molten yarrow oh and should i start using shards now?

molten yarrow
#

naah

young flame
#

o oki

molten yarrow
#

was above 1k or 2k guilds

young flame
#

someone said "yOOu ShoUlD StArT ShArDiNg NoW"

molten yarrow
earnest phoenix
#

how to make a bot for free

north birch
#

how to make a bot for free
@earnest phoenix Making bot is free

earnest phoenix
#

how

north birch
#

Hosting a bot 24/7 isn't free

earnest phoenix
#

what website or so

molten yarrow
#

you need to code it yourself

earnest phoenix
#

how

molten yarrow
north birch
#

Yeah

earnest phoenix
#

i have to buy

molten yarrow
#

you need to pay if you want it 24/7 online yes

earnest phoenix
#

how to do it none

molten yarrow
#

you can host it on your PC

earnest phoenix
#

? where

#

can we do dms

#

who wonna help me

north birch
#

Go on Discord developer and start a new project and a new bot

#

Then set up a bot folder when you're gotta code (on your pc)

#

Start coding and create your EpIk bot

#

Btw I'll go offline in a couple of minutes I'm tired

earnest phoenix
#

?

earnest phoenix
#

Question :

how can i solve this error?

Ignoring exception in on_command_error
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/discord/client.py", line 312, in _run_event
    await coro(*args, **kwargs)
TypeError: on_command_error() missing 1 required positional argument: 'ctx'```

```py
async def on_command_error(error,exc,ctx):
sudden geyser
#

Can you show more of your source code.

desert hazel
#

anyone know why this is triggering when the member does have manage messages?

rustic nova
#

|| means or, just saying

desert hazel
#

ik, so

#

If the first one is false, run the second one, if that ones false too, run the 3rd

#

but its still running even when the first one is true

#

becasue i do have the manage messages

young flame
#

how to make a bot for free
@earnest phoenix code it

#

???

desert hazel
young flame
#

lol

#

making a bot is free

#

code it

rustic nova
#

hosting it is where the problem starts

desert hazel
#

"How do i code it for free, what can i use, im on mobile"

earnest phoenix
#

what do you mean if i close program bot no work???

desert hazel
#

GUYS MY BOT WAS RUNNING AND WHEN I TURN MY PC OFF IT STOPS?!?!?!??!?!?

rustic nova
#

putinFacepalm oh no

desert hazel
#

that was a joke....

lucid prawn
#

why yell at people

#

@desert hazel

desert hazel
#

tf

#

ive been asked that before

#

ngl

#

on djs

lucid prawn
#

how are u a developer:

desert hazel
#

because i developed a bot?

lucid prawn
#

GUYS MY BOT WAS RUNNING AND WHEN I TURN MY PC OFF IT STOPS?!?!?!??!?!?
then why u ask this ^^^

desert hazel
#

That was a joke.........

#

read more up

lucid prawn
#

lol

gilded plankBOT
desert hazel
#

-bots

gilded plankBOT
lucid prawn
#

no bot?

desert hazel
#

-botinfo 774198333899800607

gilded plankBOT
#
Bot info
ID

774198333899800607

Username

Akamenotabot

Discriminator

1451

Short Description

We are this updating the bot so it may be down something and this bot can help u get more member on ur server with the new update coming

Library

discord.js

Prefix

ak

Total Upvotes

1

Monthly Upvotes

0

Server Count

No server count

Owner(s)

@lucid prawn

desert hazel
#

its becasue you havent been in a server with my bot

#

-botinfo

gilded plankBOT
#

tickNo Please include a bot mention or ID

desert hazel
#

-botinfo 764159325702193192

gilded plankBOT
#
Bot info
ID

764159325702193192

Username

Allegro

Discriminator

5734

Short Description

Low Lag, Easy to use discord music bot!

Library

discord.js

Prefix

/

Total Upvotes

45

Monthly Upvotes

7

Server Count

127 Servers | 2 Shards

Owner(s)

@desert hazel

lucid prawn
#

u should check my bot out

desert hazel
#

i will if you check my bot out o.O

lucid prawn
#

ok

desert hazel
#

how is your bot on top.gg with 8 servers o.O

stark abyss
#

How to get the answer / response from prompt in JavaScript

lucid prawn
#

i justput it on top.gg like 2 days age

desert hazel
#

How to get the answer / response from prompt in JavaScript
@stark abyss tf you mean

#

its not verifed yet?

lucid prawn
#

yes

desert hazel
#

how tho

#

in 2 days

#

LOL no its not

lucid prawn
desert hazel
#

its pending verifcation

#

its because youre logged in

lucid prawn
#

so i need to log out?

desert hazel
#

no just take my word for it.... its not on the site

#

it takes about 7 weeks to get verified

lucid prawn
#

i have two bot btw

rustic nova
#

4* now

desert hazel
#

oh

lucid prawn
#

but is was declined.

#

😦

desert hazel
#

What did it do

lucid prawn
#

wym

desert hazel
#

the bot

lucid prawn
#

to get declined

#

?

desert hazel
#

yes

lucid prawn
#

off online

desert hazel
#

lol

modest smelt
#

How do i send a jpg file?

#

in discordpy

lucid prawn
desert hazel
#

idk

lucid prawn
#

did u look at my bot?

desert hazel
#

yes

#

it is not very good yet. but it has potential

lucid prawn
#

its not done yet

desert hazel
#

why did you submit it then

lucid prawn
#

because it say here #development message
We are still updating the bot so it may be down something and this bot can help u get more member on ur server with the new update coming

hollow sedge
#

Makes sense to submit it with how long the queue is

#

Although you should fix the description

#

You should say what the bot's current features are, not just that there is more coming

#

It won't get approved otherwise

lucid prawn
#

ok

#

it say in the description this
We love this bot and we will update it alot and we hope you enjoy our bot here our commands akahelp - Shows this message. akarandom - Shows a random number from to <args 2> - akaban - Do tupban @username why - akakick - Do tupkick @username why and u can kick someone - akalove-Do tuplove - akakiss-Do tupkiss - akapurge-Do tuppurge - akagiverole-Do tupgiverole - akaremoverole-Do tupremoverole akahug hug someone akapat pat someone akaSupport - take u to the support website#

#

@hollow sedge

hollow sedge
#

How do i send a jpg file?
@modest smelt ctx.send(file=discord.File(fp="path/to/file", filename="image.jpg")

#

@lucid prawn ig that sounds better but you should fix formatting

lucid prawn
#

cloudfox is my bot

it is not very good yet. but it has potential
@hollow sedge

#

ok

modest smelt
#

@modest smelt ctx.send(file=discord.File(fp="path/to/file", filename="image.jpg")
@hollow sedge i fixed it. await ctx.send(file = discord.File(f'{problemname}.jpg'))

hollow sedge
#

Ok so I was right?

lucid prawn
hollow sedge
#

I saw, but there was nothing to say

lucid prawn
#

-botinfo 774198333899800607

gilded plankBOT
#
Bot info
ID

774198333899800607

Username

Akamenotabot

Discriminator

1451

Short Description

We are this updating the bot so it may be down something and this bot can help u get more member on ur server with the new update coming

Library

discord.js

Prefix

ak

Total Upvotes

1

Monthly Upvotes

0

Server Count

No server count

Owner(s)

@lucid prawn

hollow sedge
#

@lucid prawn please don't keep running that command here

indigo flax
#

python3 -m pip install -r requirements.txt && python3 auto-voice-channels.py

#

how come that doesnt work

rustic nova
royal crescent
#

client.user.setPresence({ activity: { name: '<activity>' }, status: 'idle' });
what are examples of <activity> that i can put here? i want my bot status to say "*help"

rustic nova
#

see above

royal crescent
#

thanks

wheat valve
#

message.guild.owner returns the owner as "null" in any server. How would i get it to respond with the actual owner, i use discord.js

quartz kindle
#

await message.guild.members.fetch(message.guild.ownerID)

wheat valve
#

Thank you

royal crescent
#
            {name: 'assume this is a link'},
        )```
when i do this, the output in discord still shows a value as "undefined"
#

is there any way to make it so that there just is no value?

fast trench
#

no...that's just how fields work...

royal crescent
#

would \0 work

solemn latch
#

'\u200'

fast trench
#

sure

solemn latch
#

oh wait

#

i typed it wrong

royal crescent
#

value: \0

#

idk

solemn latch
#

\u200b

fast trench
#

is there a node module to watch if a certain youtuber has posted a video or if a twitch streamer is live?

lyric mountain
#

Youtube and twitch api respectively

real niche
#

Guys check out this cool password generator I made (don't fucking use it or I'll use faith in every single one of you it's a joke but some people with take it seriously).

Math.floor(Math.random()*1000000).to string().split("").map(v => "abcdefghij".split("")[v]).join("")
lyric mountain
#

Yk, if you have a pass generator you can reverse-engineer generated passwords using the same algorithm

#

Except if you use hash generators

#

Hashes are tough boyes

real niche
#

Hash? You mean like this?

var hash= "hash str".split("").map(v => v.charCodeAt(0)).reduce((a, b) => a+b);
```?
sudden geyser
#

Probably not

real niche
#

But your right, I should be hashing my passwords before I put them into my database.

sudden geyser
#

That's still easily reverse-engineer-able

#

Now I wonder if you mean hashing vs. salting

lyric mountain
#

Hash is a blackmagicfuckery string generated from another string's bytes

real niche
#
sql.query("INSERT INTO `Accounts` (`username`, `password`) VALUES ('"+username+"', '"+Math.floor(Math.random()*1000000).to string().split("").map(v => "abcdefghij".split("")[v]).join("").split("").map(v => v.charCodeAt(0)).reduce((a, b) => a+b)+"')'");```
sudden geyser
#

no

lyric mountain
#

It's a one-way thing, so it can't be reversed

#

Alas why 99% trusty sites and services use for password storage

#

They really really don't know your actual password, only its hash

sudden geyser
#

Pint for the record, your code looks vulnerable to SQL injection.

lyric mountain
#

"looks" is a weak word in his case

sudden geyser
#

I don't know the definition of username so I say looks zoomeyes

#

It probably is though

lyric mountain
#

About the hash stuff pint, search for SHA-1, SHA-256 and MD5

#

It'll explain a bit about what it is

real niche
#

Hmm. So what about

app.get("/db/:sql", (req, res) => {
sql.query(req.params.sql, function(e, r, f){
res.send(r);
});
});```

Then I can do
```html
<p id="name"></p>

<script>

var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
    if (this.readyState == 4 && this.status == 200) {
       document.getElementById("name").innerHTML = JSON.parse(xhttp.responseText)["username"];
    }
};
xhttp.open("GET", "/sql/SELECT * FROM Accounts WHERE username='"+new URLSearchParams(window.location.search).get("name")+"';", true);
xhttp.send();
</script>```
lyric mountain
#

Those three are the most commonly used, but there are a myriad of them

real niche
#

Guys I'm sorry for hurting you with this code I'll fix it for you

app.get("/getname/:id", (req, res) => {
  sql.query("SELECT `name` FROM `Accounts` WHERE `id`=?;", [req.params.id], function(e, r, f){
    if(err || r.length < 1) return res.send("");
    res.send(r[0]["name");
  });
});```

```html
<p id="name"></p>

<script>

var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
    if (this.readyState == 4 && this.status == 200) {
       document.getElementById("name").innerHTML = xhttp.responseText.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/"/g, '&quot;');
    }
};
xhttp.open("GET", "/getname/"+new URLSearchParams(window.location.search).get("id"), true);
xhttp.send();
</script>```
#
crypto.randomBytes(9, function(e, b) {
  if(e) return reject(e);
  resolve(b.toString("hex"));
});```
and
```js
require("crypto").createHash("sha256").update(pass).digest("hex");
unborn ridge
#

How to make embed like this

#

The ping one

#

Without any color

blissful coral
#

just dont give color

unborn ridge
#

It shows black

real niche
#

Set it to discord background/embed color. I don't know the colors on the off the top of my head but you can use inspector to figure it out.

unborn ridge
rustic nova
#

@unborn ridge change your discord to light theme and you'll know how it works

real niche
#

Yeah that'll do it kek

rustic nova
thick gull
#

36393f

#

hex code of background on dark theme

real niche
#

2f3136

#

That's the default embed color

#

Use that to get rid of the right color

earnest phoenix
#

#ffffff00 mmLol

unborn ridge
#

Done

#

Now

#

#ffffff00

#

This

#

As color

real niche
#

?

unborn ridge
real niche
#

It's #2f3136

unborn ridge
#

Ok

lyric mountain
#

Imagine if discord's embed color accepted 4 byte colors

rustic nova
#

read the branding what i sent

earnest phoenix
#

i was kidding lol that's 8 bit hex