#development

1 messages · Page 1220 of 1

granite echo
#

oof i was close

#

thxs

wicked pivot
#
let flag = {
        DISCORD_EMPLOYEE: 'Discord Employee',
        DISCORD_PARTNER: 'Discord Partner',
        BUGHUNTER_LEVEL_1: 'Bug Hunter (Level 1)',
        BUGHUNTER_LEVEL_2: 'Bug Hunter (Level 2)',
        HYPESQUAD_EVENTS: 'HypeSquad Events',
        HOUSE_BRAVERY: 'House of Bravery',
        HOUSE_BRILLIANCE: 'House of Brilliance',
        HOUSE_BALANCE: 'House of Balance',
        EARLY_SUPPORTER: 'Early Supporter',
        TEAM_USER: 'Team User',
        SYSTEM: 'System',
        VERIFIED_BOT: 'Verified Bot',
        VERIFIED_DEVELOPER: 'Verified Bot Developer'
          }
 let UserFlags = message.member.user.flags.toArray()
 message.reply(UserFlags.length ? UserFlags.map(flags => flag[flags]).join(', ') : "none")```

it gives me my first badge
sudden geyser
#

not all badges are available via flags

wicked pivot
#

I just realized my bullshit: c

#

we can not know if a user and premium or not?

misty sigil
#

is that one message

#

per command

#

ratelimits™️

stable eagle
#
                   ^

TypeError: newchannel.setPosition is not a function``` im trying to set a channels position-
earnest phoenix
#

see your lib docs and stop making up your own methods and props lol nvm that's djs

misty sigil
fathom topaz
#

how da

#

fix this

misty sigil
#

saying "fix this" provides no useful info

#

please provide
1 - an error
2 - relevant code (preferably in a bin of some type)
3 - what you have already tried

#

thanks, me.

thin turret
#

Mans really just came here and said

#

"fix this"

misty sigil
#

whitenames.

thin turret
#

Lmao

misty sigil
#

also using glitch if i'm guessing that correctly OMEGALUL

thin turret
misty sigil
#

god im gonna run out of laughs

earnest phoenix
#

@misty sigil you are namecolorist

misty sigil
#

i mean the attitude

#

that mainly whitenames have

marble geode
#

lol

pale vessel
#

jeez

misty sigil
#

the whitename isn't determined by role

#

but by attitude

fathom topaz
#

shit code tol long

misty sigil
#

preferably in a bin of some type

marble geode
#

lol

misty sigil
#

as said in my og message

fathom topaz
#
const Discord = require("discord.js");
const client = new Discord.Client();
const Canvacord = require("canvacord");
const fs = require("fs");

client.db = require("quick.db");
client.canvas = new Canvacord();
client.commands = new Discord.Collection();
client.cooldown = new Discord.Collection();
client.config = {
    TOKEN: ".2Fn8uf8N4Trb8plm2aLmogaBy1U",
    prefix: "&",
    cooldown: 15000
};

// Load Commands
fs.readdir("./commands/", (err, files) => {
    if (err) return console.error(err);
    files.forEach(f => {
        if (!f.endsWith(".js")) return;
        let command = require(`./commands/${f}`);
        client.commands.set(command.help.name, command);
    });
});

// Events
client.once("ready", () => {
    console.log("Ready!");
});

client.on("error", console.error);

client.on("warn", console.warn);

client.on("message", async (message) => {
    if (!message.guild || message.author.bot) return;
    // Handle XP
    xp(message);
    // command handler
    if (!message.content.startsWith(client.config.prefix)) return;
    let args = message.content.slice(client.config.prefix.length).trim().split(" ");
    let command = args.shift().toLowerCase();
    let commandFile = client.commands.get(command);
    if (!commandFile) return;
    commandFile.run(client, message, args);
});```
misty sigil
#

aaaaaaaaaaaa

fathom topaz
#
unction xp(message) {
    if (!client.cooldown.has(`${message.author.id}`) || !(Date.now() - client.cooldown.get(`${message.author.id}`) > client.config.cooldown)) {
        let xp = client.db.add(`xp_${message.author.id}`, 1);
        let level = Math.floor(0.3 * Math.sqrt(xp));
        let lvl = client.db.get(`level_${message.author.id}`) || client.db.set(`level_${message.author.id}`,1);;
        if (level > lvl) {
            let newLevel = client.db.set(`level_${message.author.id}`,level);
            message.channel.send(`:tada: ${message.author.toString()}, You just advanced to level ${newLevel}!`);
        }
        client.cooldown.set(`${message.author.id}`, Date.now());
    }
}

client.login(client.config.TOKEN);
misty sigil
#

aaaaaaaaaaaaaaaaaaaaaaaa

fathom topaz
#

the toke n is not full so dont

#

tryna

#

steal

#

B)

misty sigil
#

bruh

#

you think your cool for censoring a token

#

fine

fathom topaz
#

ok

misty sigil
#

and do you understand any of this code

fathom topaz
#

yes

fickle sapphire
#

unction xp

#

Lol

misty sigil
#

seems to be a canvacord lib thing

#

i dont see where you use the canvacord

fathom topaz
#

yikes

#

oh now i understood

#

just

earnest phoenix
#

my disccord keep crashing LoL

fathom topaz
#

thet thing

#

that i

#

ADDED WRONG

#

canvacord

#

package

#

i wrote

#

canvcord

misty sigil
earnest phoenix
#

YOU WROTE CANVACORD

#

WHAT

feral aspen
#

hello

#

how can I define user as my bot

sudden geyser
#

what lib are you using

feral aspen
#

discord.js

#

v12

sudden geyser
#

<Client>.user if you want the bot's user instance

knotty obsidian
feral aspen
#

I want it like const user = ?

#

what should I put in the ?

misty sigil
#

const user = <client>.user

#

<client>.user is your bots user

sudden geyser
#

<Client> is a placeholder. It represents the instance of the client.

misty sigil
#

<message>.guild.me is your bot's member

sudden geyser
#

If you named it client, you put client.

feral aspen
#

Okay!

#

Hmm

#

For me it errors

#

This is the code

#

and it says cannot read propery user of undefined

#

and idk what to define user with

misty sigil
#

this.client is undefined

#

try just client?

quartz kindle
#

What is this referring to?

misty sigil
#

yea what is this

feral aspen
#

Im trying to make a botinfo command

#
    const embed = new Discord.MessageEmbed()
    .setColor(colors.cyan)
    .setThumbnail("https://cdn.discordapp.com/attachments/737033496480186398/740844487487782943/New_Cropped_Attitude_Logo.png")
    .addField(`General`, [
        `**・Client:** ${this.client.user.tag} (${this.client.user.id})`,


    ])```
quartz kindle
#

If that is a normal function then dont use this

misty sigil
#

show us all of it

quartz kindle
#

this is for classes and bounded functions

misty sigil
#

preferably in a bin of some type

feral aspen
#
const botconfig = require("../../botconfig.json")
const colors = require("../../colors.json");
const { version } = require("../../package.json")
const { utc } = require("moment")
const os = require("os")
const ms = require('ms')

module.exports.run = async (bot, message, args) => {

    const user = bot.user
    
    const core = os.cpus()[0];
    const embed = new Discord.MessageEmbed()
    .setColor(colors.cyan)
    .setThumbnail("https://cdn.discordapp.com/attachments/737033496480186398/740844487487782943/New_Cropped_Attitude_Logo.png")
    .addField(`General`, [
        `**・Client:** ${this.client.user.tag} (${this.client.user.id})`,


    ])```
misty sigil
#

ok so its bot.user.tag

quartz kindle
#

Yeah thats a normal function, there is no this

misty sigil
#

<client> is a placeholder we said

#

its a placeholder for the client instance

#

in your case it is called bot

feral aspen
#

so const user = bot.user.tag;

#

??

misty sigil
#

no

#

just bot.user?

feral aspen
#

It still errors

#
    at Object.module.exports.run (C:\Users\hajji\Desktop\Attitude\commands\information\botinfo.js:18:37)```
quartz kindle
#

You have to remove the this

misty sigil
#

remove this

quartz kindle
#

From the field

earnest phoenix
#

so how long till i can test my submitted bot here AYS_Hmm_intensifies

misty sigil
#

it takes 4+ weeks

earnest phoenix
#

i see

pale vessel
#

it's like discord bot verification at this point

feral aspen
#

Ok I removed it!

#

It works

#

Thank u

misty sigil
#

@feral aspen it would be bot, not client, not this.client

earnest phoenix
#

dono if biko makes it tho hes an lil basic for now but thas cause i dont like adding existing bot features

#

like except the common ban,kick,ping there alot of custom things like rvid and rimg

quartz kindle
#

The only requirment for top.gg verification is that it works and doesnt break rules

feral aspen
#

@feral aspen it would be bot, not client, not this.client
@misty sigil I made is bot.user.tag and it worked!

earnest phoenix
#

what is diffrent between this. and without

quartz kindle
#

Doesnt matter how many commands you have

earnest phoenix
#

oh then its proply getting in

#

i do use a bot client to controll his hub

#

proply is fine tho 🙂

sudden geyser
#

this is usually used in classes, but it can be used outside of them.

quartz kindle
#

@earnest phoenix the this keyword is a reference to the current context, if one exists. A context is created when youre working with objects, classes or when you bind functions

green bison
#

const role = guild.roles.find("Member", "Verified");
^
ReferenceError: guild is not defined
can anyone help me with this

patent geyser
#

you havent defined guild

earnest phoenix
#

dont use the ,

#

i dont think that works

#

and try message.guild instead

drifting wedge
#

how cna i get a reddit post title:
im using praw

earnest phoenix
#

or msg.guild

green bison
#

im trying to make a lock and unlock command

earnest phoenix
#

ih

open rune
#

guild.roles.cache.find(role => role.id === '1234')

earnest phoenix
#

oh

#

i hope there gona test -biko embed its the best command but requires the user to have manage_messages permission

#

thay do need json to input into it

green bison
#

guild.roles.cache.find(role => role.id === '1234')
@open rune can i put its name intead?

open rune
#

yes

earnest phoenix
#

its based on code i made for another bot

green bison
#

ok thank you

open rune
#

just try it

earnest phoenix
#

also anyone know how i shuld go about making an leveling system

quartz kindle
#

@earnest phoenix just make sure you have proper error messages in case the user lacks permissions. Bots are tested without any permission first

earnest phoenix
#

oh yea need to add that

patent geyser
#

I'm very confused right now,
i'm setting up an embed code in javascript, and so I'm making an example code just to check if it's all working
the command is called "embed"

so when you type in "!embed" it should work.
There are no errors, and I can't see howI've got this wrong. I've also checked for any typos, and I can't seem to find any.

in my main js file, i have:

    } else if(command == 'embed'){
        client.commands.get('embed').execute(message, args);
    }

and In my "embed" file, I have this

module.exports = {
    name: 'embed',
    description: 'example embed.',
    execute: (message, args) => {
        const exampleEmbed = new Discord.MessageEmbed()
        .setColor('#0099ff')
        .setTitle('Some title')
        .setURL('https://discord.js.org/')
        .setAuthor('Some name', 'https://i.imgur.com/wSTFkRM.png', 'https://discord.js.org')
        .setDescription('Some description here')
        .setThumbnail('https://i.imgur.com/wSTFkRM.png')
        .addFields({
            name: 'Regular field title',
            value: 'Some value here'
        }, {
            name: '\u200B',
            value: '\u200B'
        }, {
            name: 'Inline field title',
            value: 'Some value here',
            inline: true
        }, {
            name: 'Inline field title',
            value: 'Some value here',
            inline: true
        }, )
        .addField('Inline field title', 'Some value here', true)
        .setImage('https://i.imgur.com/wSTFkRM.png')
        .setTimestamp()
        .setFooter('Some footer text here', 'https://i.imgur.com/wSTFkRM.png');

        message.channel.send(exampleEmbed);
    }
}

I can't see where i've gone wrong

knotty obsidian
#

-mutedbot @knotty obsidian

pale vessel
#

mods only

green bison
#

how do i define guild ?

earnest phoenix
#

rebooted the bot lets try it

open rune
#

@green bison

earnest phoenix
#

the others have it to

#

but i forgot to make there responce embed

#

@open rune it's guild's id

open rune
#

wdym for "define guild"

earnest phoenix
#

I though he meant the just guild.

misty sigil
#

both of u are wrong

#

<message>.guild

shy turret
#

i completely forgot

#

is it

#

message.guild.roles.get() or message.guild.roles.cache.get()

open rune
#

message.guild.roles.cache.get()

#

for v12

shy turret
#

ok thx

#

i didnt want to test it by myself lol

patent geyser
#

I'm very confused right now,
i'm setting up an embed code in javascript, and so I'm making an example code just to check if it's all working
the command is called "embed"

so when you type in "!embed" it should work.
There are no errors, and I can't see howI've got this wrong. I've also checked for any typos, and I can't seem to find any.

in my main js file, i have:

    } else if(command == 'embed'){
        client.commands.get('embed').execute(message, args);
    }

and In my "embed" file, I have this

module.exports = {
    name: 'embed',
    description: 'example embed.',
    execute: (message, args) => {
        const exampleEmbed = new Discord.MessageEmbed()
        .setColor('#0099ff')
        .setTitle('Some title')
        .setURL('https://discord.js.org/')
        .setAuthor('Some name', 'https://i.imgur.com/wSTFkRM.png', 'https://discord.js.org')
        .setDescription('Some description here')
        .setThumbnail('https://i.imgur.com/wSTFkRM.png')
        .addFields({
            name: 'Regular field title',
            value: 'Some value here'
        }, {
            name: '\u200B',
            value: '\u200B'
        }, {
            name: 'Inline field title',
            value: 'Some value here',
            inline: true
        }, {
            name: 'Inline field title',
            value: 'Some value here',
            inline: true
        }, )
        .addField('Inline field title', 'Some value here', true)
        .setImage('https://i.imgur.com/wSTFkRM.png')
        .setTimestamp()
        .setFooter('Some footer text here', 'https://i.imgur.com/wSTFkRM.png');

        message.channel.send(exampleEmbed);
    }
}

I can't see where i've gone wrong
@patent geyser

quartz kindle
#

Add a console.log before and after the embed

pale vessel
quartz kindle
#

See if anything is logged in your console

green bison
#

it says
const guild = client.guild.id();
^

TypeError: Cannot read property 'id' of undefined

open rune
#

yes, logs always help you

quartz kindle
#

There is no client.guild

open rune
#

@green bison

#

like this:

#
client.on('message', (message) => {
  const id = message.guild.id
}

for example

patent geyser
#

Add a console.log before and after the embed
I'll try that now, ty

pale vessel
open rune
#

edited, lol, out of my sight

#

thanks

green bison
#

it says
const role = message.guild.roles.cache.get("MEMBER", "verified");
^

ReferenceError: message is not defined

quartz kindle
#

Where are yoi trying to use that?

#

Inside which event?

green bison
#

to make a lock and unlock command

quartz kindle
#

In which event?

#

If its a command, then it should be inside the message event

#

Otherwise there is no message

green bison
#

const role = message.guild.roles.cache.get("MEMBER", "verified");

client.on("message", (message) => {
const id = message.guild.id
if (message.content === "lock") {
message.channel.overwritePermissions(role,{ 'SEND_MESSAGES': false })
msg.reply('Done!');

}
});
this is my code

quartz kindle
#

It has to go inside the message event

#

Message doesnt exist outside

earnest phoenix
#
    at RequestHandler.execute (D:\Bots\biko\v0.0-rw\node_modules\discord.js\src\rest\RequestHandler.js:170:25)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:81464) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:81464) [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.```
#

wtf happened there

quartz kindle
#

Unknown message

earnest phoenix
#

how tf did that happen

quartz kindle
#

You tried to edit or delete a message that no longer exists

earnest phoenix
#

oh

#

is it also if the bot has no perms

cinder sandal
#

my balance command always says that i have 0 coins (null coins)
how to fix it?
i use quick.db and discord.js
can send code

earnest phoenix
#

or are those those whack client side cydle/boost/etc messages

#

That would be awesome ^^

cinder sandal
#
const Discord = require('discord.js')
const db = require('quick.db')
module.exports = {
    name: 'balance',
    description: 'shows ur balance',
    cooldown: 5,
    
    execute(message, args) {
            let moneyAmount = db.fetch(`money_${message.author.id}`)
            
            if(moneyAmount === null) moneyAmount = 0;

            message.channel.send(`You have a total of ${moneyAmount} Coin(s)`)
  },
};```
#

it always returns 0 (null)

#

but i have 1 or more coins

thick gull
#

is that the right path?

#

money_173627728 (?)

quartz kindle
#

Show how you save the money

earnest phoenix
#

^

thick gull
#

or are you saving under like users_money_17362882

cinder sandal
#
let amount = 1;

        message.channel.send(`You walked on the streets and got **1** Coin.`)
        db.add(`money_${message.guild.id}_${message.author.id}`, amount)```
drifting wedge
#

how cna i get a reddit post title:
im using praw

wicked pivot
#

is it possible to send all the things said in the terminal in a specific channel?

earnest phoenix
#

Ah ha

quartz kindle
#

You saved the money differently

#

With a guild id

cinder sandal
earnest phoenix
#

You can

quartz kindle
#

Depends, do you want money to be global or per guild?

cinder sandal
#

global

#

per user

quartz kindle
#

Then remove it

open rune
#

Depends, do you want money to be global pr per guild?
@quartz kindle wait what? we can use global currency instead per guild?

quartz kindle
#

Sure?

#

Why wouldnt you?

open rune
#

I just...

thick gull
#

money_user rather than money_guild_user

open rune
#

misunderstanding lol xD

earnest phoenix
#

😂

woeful bluff
drifting wedge
#

using the embed=discord embed

cinder sandal
#

@woeful bluff too late already did

drifting wedge
#

embed=discord.Embed(colour=self.random_color, title='pee size machine', description=f"{ctx.message.author}'s penis\n{random.choice(possible_responses)}")

cinder sandal
#

starting the bot

drifting wedge
#

how can i add a image?

thick gull
#

author’s penis

cinder sandal
#

hahha

fringe axle
#

So I get this error every time I try to install better-sqlite3 but I installed Python... Anyone knows why?

cinder sandal
#

funi

thick gull
#

check your PATH

drifting wedge
#

how do i add an imaghe?

quartz kindle
#

Did you restart the command prompt?

fringe axle
#

check your PATH
@thick gull how?

cinder sandal
#

ty fixed

earnest phoenix
#

@quartz kindle tim finally youre here

#

Find where python is installed @fringe axle

#

Any idea why quick.db keeps breaking?

fringe axle
#

Find where python is installed @fringe axle
@earnest phoenix Okay!

quartz kindle
#

Because quick.db is bad

cinder sandal
#

i use it

open rune
#

use mysql2 xd

cinder sandal
#

but is it rly bad?

earnest phoenix
#

Then whats better version for it

#

yeah, I was about to say. I feel as of quick.db is extremely unstable.

quartz kindle
#

@fringe axle did you restart the command prompt after installing python?

fringe axle
#

I installed Python of the web

earnest phoenix
#

@earnest phoenix Do you know any php? If so I would switch to a MySQL database and create APIs to do what you want to do.

cinder sandal
#

quick.db is simple but.. unstable?

earnest phoenix
#

Yes

#

Basically

#

That’s why I switched my bot from quick.db to MySQL databases

open rune
#

I understand php

sudden geyser
#

it's flaw is being simple

fringe axle
quartz kindle
#

Thats not the location lol

drifting wedge
#

embed=discord.Embed(colour=self.random_color, title='pee size machine', description=f"{ctx.message.author}'s penis\n{random.choice(possible_responses)}")

HOW CAN I ADD AN IMAGE?

#

caps sry

quartz kindle
#

Those are just shortcuts

fringe axle
#

Oh...

quartz kindle
#

Just restart your pc

#

After installing python

fringe axle
#

oof, I'm not at home and my laptop is super slow...

quartz kindle
#

Also, you should provably install the entire build tools

earnest phoenix
#

@drifting wedge I believe it’s “set_image”

cinder sandal
#

how can ur laptop handle windows 10 then

earnest phoenix
#

So

fringe axle
#

Also, you should provably install the entire build tools
@quartz kindle how?

quartz kindle
#

Open admin powershell

fringe axle
#

Yes

#

In a folder?

quartz kindle
#

type npm install -g windows-build-tools

fringe axle
#

Okay

quartz kindle
#

Wait until is says All Done!

fringe axle
#

Installing now

quartz kindle
#

It will take a while

fringe axle
#

Okay

#

How long you think?

quartz kindle
#

Depends on your pc and internet

fringe axle
#

Internet = Good Laptop = Bad

quartz kindle
#

On a fast pc it takes about 5 mins

fringe axle
quartz kindle
#

On a bad pc it can take 30+ min

fringe axle
#

OOF...

earnest phoenix
#

@drifting wedge If your doing a url for a image it would be “set_image(url=“blah”)”

drifting wedge
#

ok

misty sigil
#

huh thats weird

drifting wedge
#

and how can i get the title of a reddit post

#

im using praw

misty sigil
#

I can't reduce results from my 2 shards

#

it returns an object

dusty tulip
misty sigil
#

and it has to be awaited

cinder sandal
#

should i change the main file to app.js to use Sequalize for economy commands?

fathom topaz
#

k

#

do java and ide

cinder sandal
#

answer me

quartz kindle
#

@misty sigil are you talking about broadcastEval?

misty sigil
#

no

#

fetchClientValues

quartz kindle
#

Same thing, it returns a promise

cinder sandal
#

my question is ignored

carmine summit
#

How does && and || being combined works?

quartz kindle
#

Weirdly, give them an extra parens to make sure it does what you want

open rune
#

like that, maybe.

cinder sandal
#

do i need to rename my main bot file to app.js if i use Sequalize for economy commands?

quartz kindle
#

No

carmine summit
#

What i mean is if (a && b || c && d || e)

#

How does it work?

cinder sandal
#

oh

#

i'm hosting on heroku

drifting wedge
#

how do i add a value to author?

#

py

cinder sandal
#

and maybe the database will reset every time

drifting wedge
#

do i need to rename my main bot file to app.js if i use Sequalize for economy commands?
@cinder sandal u cant use sql for heroky

#

u need something like mongo

quartz kindle
#

@carmine summit dont do that, do what witch said

carmine summit
#

What does parens do

#

Return a boleen ok

quartz kindle
#

Same as they do in math

#

Things inside them are done first

carmine summit
#

Is parens inside a parens a thing?

quartz kindle
#

Yes

drifting wedge
#

how do i add a value to author?

#

embed

cinder sandal
#

anyway is repl.it hosting better than heroku?

fathom topaz
#

not

#

at all

#

heroku best never did anything to meh

thick gull
#

What i mean is if (a && b || c && d || e)
@carmine summit if a and b are true, or c and d are true, or if e is true

cinder sandal
#

what db should i use for heroku?
it resets the db every restart

earnest phoenix
#

I can’t really give hosting advice 😅 I use my own dedicated servers

thick gull
#

(a && b) (c && b) (e)

#

as long as one of those are true

#

if a and b Is true then that passes

#

etc

drifting wedge
#

what db should i use for heroku?
it resets the db every restart
@cinder sandal mongo

cinder sandal
#

it is good? or decent?

misty sigil
#

mongo is about the best you can get for a discord bot imo

quartz kindle
#

Heroku has a built in postgre db

misty sigil
#

could be because thats literally the only db i use

earnest phoenix
#

MongoDB is used by most discord bot list if that gives you a idea.

quartz kindle
#

I wouldnt say most

drifting wedge
#

yo

quartz kindle
#

I dont use mongo

earnest phoenix
#

Well

drifting wedge
#

how do i add a author url for embeds in d.py

earnest phoenix
#

Some

misty sigil
open rune
#

welp, I am using mysql

misty sigil
#

its definitely based on something noSQL

quartz kindle
misty sigil
#

:^)

earnest phoenix
#

Dangggggg

earnest phoenix
#

Roast and a half

misty sigil
#

its true tho

earnest phoenix
#

Yeah

quartz kindle
#

@opaque eagle are you using ts?

drifting wedge
#

YO

#

how do i add a author url for embeds in d.py

opaque eagle
#

yeah

slender thistle
#

set_author(url="someurl")

quartz kindle
#

That is a js error, cant do anything with it if youre using ts

drifting wedge
#

THANK YOU

quartz kindle
#

Not without sourcemaps

#

You need to figure it out in your ts code and make sure youre extending the correct thing

opaque eagle
#

oh ok

drifting wedge
#

embed.set_author(name=submission.title, url=submission.url)

#

does this work?

earnest phoenix
#

Try it 🤷🏻

drifting wedge
#

well it works

#

but doesnt send the url

#

like i want to link the post

slender thistle
#

Did you click on the author field

drifting wedge
#

?

slender thistle
#

I'm not sure how my message is unclear

#

literally try clicking on the author field in the embed that you send

golden condor
#

Did you press the author in the embrd

drifting wedge
#

o 1 sec

#

🤣

#

lol

#

its there

#

LMAO

cinder sandal
#

is mongo better than mysql

drifting wedge
#

i thought id be blue

open rune
#

I'm not sure how my message is unclear
I know what you feel lol xd

drifting wedge
#

thats why

#

is mongo better than mysql
@cinder sandal yea

open rune
#

i thought id be blue
@drifting wedge that's not html xd

cinder sandal
#

cool trying to make a db for my bot

drifting wedge
#

cool trying to make a db for my bot
@cinder sandal python?

cinder sandal
#

discord.js

drifting wedge
#

a

#

also how can i get how many upvotes the post has?

low shard
#

Wdym

quartz kindle
#

Mongo is not better than mysql

open rune
#

^

quartz kindle
#

They are different, each has pros and cons

low shard
#

MySQL

quartz kindle
#

Its like asking is mac is better than windows

drifting wedge
#

like how many upvotes a reddit post has

#

Its like asking is mac is better than windows
@quartz kindle windows is better

#

if u disagree, your opinion is wrong

thick gull
#

😩

quartz kindle
#

lmao

thick gull
#

wait till he finds out I’m using light theme

open rune
#

well, It's like you're asking, which one is more expensive, mac or windows

drifting wedge
#

also 1 more question

#
            colour = discord.Colour.blue()
            )```
#

i have a property called random_color

thick gull
#

it is quite literally someone’s opinion

drifting wedge
#

how can i make the embed, random color

thick gull
#

you do not dictate an opinion

quartz kindle
#

Unless youre a dictator

lethal pine
#

hey can anyone explain me what is shards discord.py

thick gull
#

but why would a dictator be on discord bot list

quartz kindle
#

Shards are discord connections

#

Discord only allows up to 2500 guilds to be handled per connection, so once your bot grows, you will need to split your bot into multiple connections. This is known as sharding

lethal pine
#

ohh

slender thistle
#

"property" random_color?

#

How are you generating it?

lethal pine
#

thankx man for the help @quartz kindle

low shard
#

So discoed

#

Discord it’s a gay platform

blissful tinsel
#

what should i do when i node . and it stays and looks like its loading but it just is just bugged

#

C:\Users\artur>cd DiscordBot

C:\Users\artur\DiscordBot>node .

#

its staying like that

#

for 10 minutes

misty sigil
#

whats ur package.json like?

#

and whats ur code like

blissful tinsel
#

ok

#

{
"name": "discordbot",
"version": "1.0.0",
"description": "First Discord Bot",
"main": "Main.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"author": "DartHPL",
"license": "ISC",
"dependencies": {
"discord.js": "^12.3.1"
}
}

#

its package

#

here is script

#

const client = new Discord.Client();

const prefix = '!';

client.once('ready', () => {
    console.log('DarkTardis status - online');
});


client.on('message', message =>{
    if(!message.content.startsWith(prefix) || message.author.bot) return;

    const args = message.content.slice(prefix.length).split(/ +/);
    const command = args.shift().toLowerCase();

    if(command === 'help')
        message.channel.send('!help: shows commands and features.');
        message.channel.send('!version: shows versions of bot.');
        message.channel.send('more features soon....');
    

     if(command == 'version')
        message.channel.send('My version is 1.0.0');


client.login('');

});```
quartz kindle
#

Its normal to stay like that, it means the bot is running. Does it not come online?

blissful tinsel
#

its not online

misty sigil
#

ok so

blissful tinsel
#

there is no log

quartz kindle
#

You didnt do what i said

blissful tinsel
#

that its online

misty sigil
#

is that 3 messages

#

all sent at once

#

i'd advise you dont do that

#

because ratelimits 👀

blissful tinsel
#

its not running anyways

quartz kindle
#

You didnt do what i said about client.login having to be standalone

misty sigil
#

why is client.login() in a message event

blissful tinsel
#

im beginner

#

i started yesterday

thick gull
#

I eval d all my members cause I wasn’t thinking last night now I have a list of 50K avatars 😩

misty sigil
#

it cant receive messages when its not logged in

drifting wedge
#

@slender thistle

open rune
#

do what Tim said @blissful tinsel

fringe axle
#

@quartz kindle I installed it successfully. I try to install sqlite3 again

blissful tinsel
#

ik

drifting wedge
#

@property
def random_color(self):
return discord.Color.from_rgb(random.randint(1,255),random.randint(1,255),random.randint(1,255))

fringe axle
#

Looking good

blissful tinsel
#

and its stayin

#

ok

slender thistle
#

I don't get why it's a property but

earnest phoenix
#

regardless whether you're a beginner or not, it would make sense that you would not receive messages when you're not logged in, no?

slender thistle
#

random_color()

drifting wedge
#
            colour = discord.Colour.random_color()
            )```
#

?

misty sigil
#

@earnest phoenix i mean i suppose yes

blissful tinsel
#

im logged but bot isnt

misty sigil
#

put client.login

blissful tinsel
#

it does not

slender thistle
#

Probably

#

try it

misty sigil
#

outside of the message event

blissful tinsel
#

ok

earnest phoenix
#

but you are not your bot

open rune
#

did you put out client.login() out of event?

#

@blissful tinsel

blissful tinsel
#

i will

earnest phoenix
#

djs doesn't know that you're logged in to discord nor does it care

knotty obsidian
misty sigil
drifting wedge
#

discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: type object 'Colour' has no attribute 'random_color'

cinder sandal
#

with what should i replace <dbname> in the driver link?

misty sigil
#

the dbname

#

what you called it

earnest phoenix
#

you need to understand that your bot is a separate user from you, you may own the bot but it's a different user entirely and needs its own client just like you do, darth

misty sigil
#

e.g. database
| collection

cinder sandal
#

the project name?

misty sigil
#

no

#

the db name

#

did you not create a db?

blissful tinsel
#

ik

#

i know it cry

torn pine
#

db

cinder sandal
#

no

misty sigil
#

make one

cinder sandal
#

how

blissful tinsel
#

i maked it online before

misty sigil
#

ooh now you're asking

quartz kindle
#

@cinder sandal which db are you using?

slender thistle
#

discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: type object 'Colour' has no attribute 'random_color'
@drifting wedge Where's that property located

blissful tinsel
#

also when i have typed node . i cant type anything other

cinder sandal
#

@quartz kindle mongoDB

misty sigil
#

but

quartz kindle
#

Atlas or self hosted?

misty sigil
#

your own cluster or an atlas?

cinder sandal
#

Atlas

#

own cluster

misty sigil
#

under collections

#

what

#

atlas but your own

#

ok

quartz kindle
#

Then the db name should be in your atlas admin panel

cinder sandal
#

is it in the clusters page

drifting wedge
#

@drifting wedge Where's that property located
@slender thistle in the cog

quartz kindle
#

The full connection url should be there,

drifting wedge
#

at the top, before the command

slender thistle
#

So do self.random_color

misty sigil
cinder sandal
#

should i click load a sample dataset?

misty sigil
#

no

#

create database

sweet kestrel
#

hey guys

#

I have a python qyesion

#

question

cinder sandal
#

it's just "Create your own data" but ok

#

theres the Database name field

sweet kestrel
#

is there a way to let bot send message without await?

#

is there a way?

quartz kindle
#

Yes but why would you want that?

sweet kestrel
#

cause i have two await message in my bot code

fringe axle
sweet kestrel
#

I want to remove one

#

@quartz kindle

quartz kindle
#

Then remove it?

sweet kestrel
#

but I still want the message to be sent

quartz kindle
#

Then why do yoi want to remove it?

sweet kestrel
#

because when 1 await iss runnnign the second one does not work

#

that's why i wanna remove the first await

wary flame
#

How can I fix this?
Seems like you are sending an invalid ssl cert

sweet kestrel
#

replace it with something els

#

else

#

is there a way?

quartz kindle
#

You want to send both messages at the same time?

sweet kestrel
#

yes

quartz kindle
#

Out of order?

sweet kestrel
#

emmm

#

out of order?

quartz kindle
#

Like message2 can be sent before message1

#

If you dont await

wary flame
#

Where did you get your ssl cert from @fringe axle

sweet kestrel
quartz kindle
#

If you dont mind, then just remove the await

sweet kestrel
#

is this right?

quartz kindle
#

Wait youre using py?

sweet kestrel
#

yes

quartz kindle
#

Ah

#

Idk if you can remove the await in py, but try it

sweet kestrel
#

😭

#

I did

warm marsh
#

For?

drifting wedge
#

discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: module 'discord' has no attribute 'self'

sweet kestrel
#

but it don;t work

restive furnace
#

u can'5 remove await in py

drifting wedge
#
            colour = discord.self.random_color()
            )```
sweet kestrel
restive furnace
#

(since 1.0)

sweet kestrel
#

;(

warm marsh
#

discord.py is built on asyncio or something meaning everything requires await

restive furnace
#
async def asyncfunction(ctx):
    await ctx.send("correct")```
quartz kindle
#

Google for asyncio concurrency

sweet kestrel
#

:(((

cinder sandal
#

where should i put the mongoDB driver link?

drifting wedge
#

just watch a video

#

u want me to link u some?

cinder sandal
#

no

drifting wedge
#

ok

wary flame
#

The mongodb connection uri?

cinder sandal
#

i can't do const ms = require('ms') ms is declared but it's value is never read.

#

@wary flame yes

earnest phoenix
#

How i can make displayAvatarURL() image bigger

wary flame
#

Should be a param for the connection constructor/function

earnest phoenix
#

cuz by me it is so small

wary flame
#

What driver are you using

cinder sandal
#

node v3.6+ maybe

quartz kindle
#

@earnest phoenix change the size in the image options

earnest phoenix
#

how

blissful tinsel
#

again nothing works on my error

wary flame
#

I meant the lib you use to connect the your mongodb server

#

Mongoose?

quartz kindle
#

@blissful tinsel did you remove the login from inside the message?

blissful tinsel
#

oh

earnest phoenix
#

@quartz kindle how i can change the siez

blissful tinsel
#

i will

cinder sandal
#

@wary flame yes

quartz kindle
#

@earnest phoenix check the docs and youll see how

earnest phoenix
#

😮 i see

thick gull
#
}) //end of your msg listener
client.login('token')
earnest phoenix
#

thx

thick gull
#

outside

wary flame
#

const db = await mongoose.connect('mongodb uri', opts)

blissful tinsel
#

@quartz kindle again same thing ocurrs

quartz kindle
#

Show current code

blissful tinsel
#

const client = new Discord.Client();

const prefix = '!';

client.once('ready', () => {
    console.log('DarkTardis status - online');
});


client.on('message', message =>{
    if(!message.content.startsWith(prefix) || message.author.bot) return;

    const args = message.content.slice(prefix.length).split(/ +/);
    const command = args.shift().toLowerCase();

    if(command === 'help')
        message.channel.send('!help: shows commands and features.');
        message.channel.send('!version: shows versions of bot.');
        message.channel.send('more features soon....');
    

     if(command == 'version')
        message.channel.send('My version is 1.0.0');


client('')
});```
misty sigil
#

still

#

inside of it

quartz kindle
#

What

misty sigil
#

also not logging in anymore

wary flame
#

i can't do const ms = require('ms') ms is declared but it's value is never read.
You can, just means you are not using the variable

quartz kindle
#

Thats not what removing login means

open rune
#

omg @blissful tinsel

blissful tinsel
#

i tried without those ''

misty sigil
blissful tinsel
#

before but it didnt worked

knotty obsidian
#

This @earnest lotus bot stole my prefix

blissful tinsel
#

man im newbie

#

what you expect?

earnest phoenix
#

your prefix isn't original lol

misty sigil
#

a basic understanding of js

drifting wedge
#

discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: module 'discord' has no attribute 'self'

open rune
#
client.on("message", msg => {
  // YOUR SCRIPT
});

client.login(token)

do this @blissful tinsel

drifting wedge
#
            colour = discord.self.random_color()
            )```
misty sigil
#
}); // THIS IS THE END OF YOUR MESSAGE LISTENER
client.login() 
blissful tinsel
#

ooooh

misty sigil
#

is it really that hard

opaque eagle
#

Also are we gonna talk about that help command

cinder sandal
#

i use .env, where do i put the dataURL if it needs to be putted intoconfig.json that is worse than .env

misty sigil
#

yes

granite echo
#

@blissful tinsel i fixed this for u already

misty sigil
#

lets talk about it

opaque eagle
#

you're sending each line as a separate message synchronously

slender thistle
#

What the fuck

misty sigil
#

WHY DOES IT SEND 3 MESSAGES

opaque eagle
#

and the if-statement doesn't have a block

earnest phoenix
#

3 if the message content is help

#

2 regardless of the content

#

only the first send is under the if clause

cinder sandal
#

i use .env, where do i put the dataURL if it needs to be putted intoconfig.json that is worse than .env
@cinder sandal

blissful tinsel
#

th it works

knotty obsidian
#

your prefix isn't original lol
@earnest phoenix ;-----;

misty sigil
#

your help command doesnt tho

earnest phoenix
#

Anyone here mind helping me with webhooks?

misty sigil
restive furnace
#

discord.Colour.random_color() if that exists, you might be lookin' for @drifting wedge

cinder sandal
#

if mongo is only for config.json i'm out

misty sigil
#

it can be done in .env

cinder sandal
#

how

drifting wedge
#

discord.Colour.random_color() if that exists, you might be lookin' for @drifting wedge
@restive furnace that doesnt work

cinder sandal
#

what variable should i use

drifting wedge
#

i tried

misty sigil
#

whatever the fuck you want

#

it doesnt matter

#

it just matters what you put in your code

slender thistle
#

self.random_color

drifting wedge
#

so no discord.?

slender thistle
#

I don't see why you would append discord. anyway

#

if self refers to the class where the command is

restive furnace
#

by the way, discord.py and python provides really awesome docs, i have used them lately, and they explain everything very well.

slender thistle
#

No sane person names ANY property/module self

drifting wedge
#

discord.ext.commands.errors.CommandInvokeError: Command raised an exception: TypeError: 'Colour' object is not callable

slender thistle
#

Then just self.random_color

drifting wedge
#

colour = self.random_color()?

restive furnace
#

try it and see

slender thistle
#

Don't call it

#

Remove the ()

fringe axle
#

Where did you get your ssl cert from @fringe axle
@wary flame I just want to redirect after a discord login

earnest phoenix
#

Localhost

fringe axle
#

It's only a redirect after login

#

Yea

earnest phoenix
#

hmm idk

fringe axle
#

Someone knows where the Visual Studio Code project properties are?

earnest phoenix
#

{"appid":940020,"name":"Survive Together"}

slender thistle
#

response["appid"] where you use a filter to get an object with object["appid"] == 940020

charred owl
hazy sparrow
#

Is there a tutorial for json.db

misty sigil
#

what

hazy sparrow
#

the json database thingy

earnest phoenix
#

@charred owl debug it then...? inspect your variables and check what you're passing to the embed

misty sigil
#

bruh2 bow pro, json is not a database

earnest phoenix
#

@hazy sparrow do not use json as a database, it isn't and was never meant to be one

misty sigil
#

nothing you can do will make a .json a database

#

it never will be a database

charred owl
#

@earnest phoenix how?

fringe axle
#

How can I enable SSL in Visual Studio Code?

misty sigil
#

by printing it

hazy sparrow
#

hmm this quick.db needs this VS tools which is fking large

fringe axle
#

by printing it
@misty sigil I read that a setting is there

misty sigil
#

no

earnest phoenix
#

How can I enable SSL in Visual Studio Code?
@fringe axle ssl is not something you "enable"

misty sigil
#

you cant have ssl on an IP

#

nor is it something you just "enable"

fringe axle
#

Oof...

#

But I need it...

earnest phoenix
#

selfsign one

fringe axle
#

How? I use localhost

misty sigil
#

you cant put ssl on an ip

fringe axle
#

oof

earnest phoenix
#

you can generate a selfsigned ssl cert for localhost

fringe axle
#

But how?

earnest phoenix
#

you could've also found this with a 5 second google search

fringe axle
#

Thanks

knotty obsidian
#

how can i make a public bool value?

restive furnace
#

public bool aVariable = false;

knotty obsidian
#

isnt this... csharp?

earnest phoenix
#

well you didn't state your language

knotty obsidian
#

Java

restive furnace
#

no that goes with csharp and java

#

and i have helped you before, that's why i assumed you used java still

knotty obsidian
#

'class' or 'interface' expected

earnest phoenix
#

java uses boolean

restive furnace
#

oh yea

knotty obsidian
#

oh

#

where do i put that line?

earnest phoenix
#

what do you actually want to do

restive furnace
#

in the beginning of the class..?

knotty obsidian
#

oh okay

sterile thicket
#

I'm using a .MessageCollector() and I want to send a message on timeout, how do I do that?

cinder sandal
#

i get an error with mongo: (node:23) UnhandledPromiseRejectionWarning: MongoError: bad auth Authentication failed. is everything right?

restive furnace
#

no

cinder sandal
#

then what the error means? is the driver code invalid?

sweet kestrel
#

is there a way to check users inventory?

#

like if he or she have this item or not

#

is this correct?

earnest phoenix
sweet kestrel
#

.?

#

lol, it don't work

#

that's why

#

I posted it here

earnest phoenix
#

@cinder sandal Your credentials to authenticate with your mongodb driver is invalid

#

Make sure it's the correct one

cinder sandal
#

thanks will verify the password and db name

earnest phoenix
#

LoL who gonna lose some money to buy a domain

#

only for that clip

#

xD

opaque eagle
#

If I want to get a scope in NPM that's taken up by an inactive account, would NPM support be able to help me with it

#

The scope I want is taken up by a user with 0 packages and a linked github account that's deleted

small prairie
#

how can i fix this

was compiled against a different Node.js version using
NODE_MODULE_VERSION 83. This version of Node.js requires
earnest phoenix
#

jk it doesnt exist

#

-botinfo aeon

gilded plankBOT
#

tickNo Please include a bot mention or ID

earnest phoenix
#

@iron raft

#

-botinfo 635833307510079490

gilded plankBOT
#
Bot info
ID

635833307510079490

Username

Aeon

Discriminator

4105

Short Description

Your ultimate Discord bot with many utilities and API integrations.

Library

discord.js

Prefix

. (customizable) or mention

Total Upvotes

469

Monthly Upvotes

29

Server Count

109 Servers | 1 Shards

Owner(s)

@pale vessel

earnest phoenix
#

: /

sterile thicket
#

how can i fix this

was compiled against a different Node.js version using
NODE_MODULE_VERSION 83. This version of Node.js requires

@small prairie try google

earnest phoenix
#

aeon ui

#

aeon botino

small prairie
#

Thanks you helped a bunch @sterile thicket

earnest phoenix
#

poh no

sterile thicket
earnest phoenix
#

oh no

#

oh mo

#

sorry

#

how do i get the name as body

{"252490":
{"success":true,
"data":
{"type":"game",
"name":"Rust",
#

${body1.data.name[0]}

pale vessel
#

obj["252490"].data.name

sterile thicket
#

Thanks you helped a bunch @sterile thicket
@small prairie lmao, no but, it has few steps, you need to delete your node modules and update, and all

small prairie
#

just saw that

#

say*0

earnest phoenix
#

thx @pale vessel

drifting wedge
#

how can i get someones avatar?

small prairie
#

saying to google isnt helping me
i came here for help :/

drifting wedge
#

like as a png?

#

using python?

#

i want to do like welcome cards

#

and i have it all working

sterile thicket
#

you tried .py docs?

drifting wedge
#

but i now just need to get the users pfp into the picture

#

you tried .py docs?
@sterile thicket yea

sterile thicket
#

it's not there?

gentle oxide
#

What is the commands MB

slender thistle
#

It's not documented

gentle oxide
#

MEMORIA RAM: ...mb

#

Please write the commands

slender thistle
#

Send a request to the user's profile picture URL and get the response @drifting wedge

#

those bytes will be the image

drifting wedge
#

Send a request to the user's profile picture URL and get the response @drifting wedge
@slender thistle well it would be on the on_member join event

#

so i could get the users name and avatar url

#

im using PIL

#

so id have to like get it as a file

#

but then delete it afterwards?

slender thistle
#

meh, could cache the user's avatar

drifting wedge
#

intresting

snow urchin
#

was told go here even though topic clearly states bot development not github actions

slender thistle
#

bot dev optimally, but never restricted to just that

snow urchin
#

oke

granite echo
#
if (!user.botone) { //issue here
    userdb.set(user.botone, id)
} else if (!user.bottwo) {
    userdb.set(user.bottwo, id)
} else if (!user.botthree) {
    userdb.set(user.botthree, id)
} else if (!user.botfour) {
    userdb.set(user.botfour, id)
} else if (!user.botfive) {
    userdb.set(user.botfive, id)
} else if (!user.botsix) {
    userdb.set(user.botsix, id)
}

(node:1576) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'botone' of undefined
im so confused ;-;

quartz kindle
#

User is not defined

granite echo
#

how

#

it is

#

ik it is

quartz kindle
#

Show more code

#

Where is it defined?

granite echo
#
const userdb = new JSONdb('./users.sqlite')
const user = userdb.get(message.author.id)
if (!user.botone) {
    userdb.set(user.botone, id)
} else if (!user.bottwo) {
    userdb.set(user.bottwo, id)
} else if (!user.botthree) {
    userdb.set(user.botthree, id)
} else if (!user.botfour) {
    userdb.set(user.botfour, id)
} else if (!user.botfive) {
    userdb.set(user.botfive, id)
} else if (!user.botsix) {
    userdb.set(user.botsix, id)
} 
#

welp

#

but there

quartz kindle
#

The user doesnt exist in the database

thick gull
#

add an if(!user) ?

granite echo
#

it adds it to it

#

well

#

is meant to

#

when it gets verifed

#

but it dont

quartz kindle
#

Show where you add to it

granite echo
#

wdym

thick gull
#

check if user exists

#

if it doesn’t create user

granite echo
#

can one person help me only thxs

quartz kindle
#

Where do you do database.set(user id)

granite echo
#

db*

#
const userdb = new JSONdb('./users.sqlite')
const user = userdb.get(message.author.id)
if (!user.botone) {
    userdb.set(user.botone, id)//totally not right here
} else if (!user.bottwo) {
    userdb.set(user.bottwo, id)
} else if (!user.botthree) {
    userdb.set(user.botthree, id)
} else if (!user.botfour) {
    userdb.set(user.botfour, id)
} else if (!user.botfive) {
    userdb.set(user.botfive, id)
} else if (!user.botsix) {
    userdb.set(user.botsix, id)
} 
quartz kindle
#

user doesnt exist

granite echo
#

lol ok

quartz kindle
#

you cant set user.botone if user doesnt exist

granite echo
#

it really does

quartz kindle
#

You need to set user first, then you can set user.botone

snow urchin
quartz kindle
#

Then show where you set user

granite echo
#

ur confusing me, find what u need

quartz kindle
#

Jesus christ lmao

earnest phoenix
#

wait we can use Github as a hosting

quartz kindle
#

No

earnest phoenix
#

webhosting ?

#

huh

quartz kindle
#

Yes

#

Webhosting yes, not bot hosting

earnest phoenix
#

oh

#

where

#

can u give me link

quartz kindle
#

Google github pages

earnest phoenix
#

ok

thick gull
#

you cannot modify something that doesn’t exist

#

you have to create the user first

quartz kindle
#

^

#

I g2g, good luck

granite echo
thick gull
#

I literally told you the solution

#

check if user exists

#

if it doesn’t

#

then create user

granite echo
#

whatever

thick gull
#

db.set(“user-or-whatever-it-is”, author.id)

#

and then you continue

granite echo
#

then i gotta change other stuff to add something else

#

and have u been actually listening this whole time

misty sigil
#

have you?

granite echo
#

because if u look user does exsist

thick gull
#

User is not defined

granite echo
thick gull
#

it started with thus

misty sigil
#

he literally

thick gull
#

user is not defined because there is no user in the db

granite echo
#

as i said

thick gull
#

check if it is undefined if it is then create the user

granite echo
#

it gets added when the bot is verifed

#

as i said before

thick gull
#

then it’ll be undefined

#

until the user

#

is added

#

to the database

granite echo
#

o

#

k

thick gull
#

that is your error

granite echo
#

o

#

k

misty sigil
#

can you not unnecessarily split messages

granite echo
#

sorry mod

#

i wont

thick gull
misty sigil
#

I’m not a mod

granite echo
#

then stop mini modding

#

have a nice day

misty sigil
#

bruh

wicked pivot
#
const {get} = require('superagent');
const {readFileSync} = require('fs');
const {MessageAttachment} = require('discord.js')
const ConfigExport = require('../assets/command')
const EmbedExport = require('../assets/embed')

module.exports.run = async(bot, message) => {
  if(await ConfigExport.check(message) === true)return

  let { Canvas } = require('canvas-constructor');
  let user = message.mentions.users.first() || message.author
  let getSlapped = async (person) => {
  let plate = await readFileSync('./assets/images/plate_beautiful.png');
  let png = person.replace('.gif', '.png');
  let { body } = await get(png);

  return new Canvas(634, 675)
    .setColor(0x00A2E8)
    .addRect(0, 0, 634, 675)
    .addImage(body, 423, 45, 168, 168)
    .addImage(body, 426, 382, 168, 168)
    .addImage(plate, 0, 0, 634, 675)
    .toBuffer();
  }
  try {
    let person = user.avatarURL({dynamic : false});
    let result = await getSlapped(person);
    const attachment = new MessageAttachment(result, 'beautiful.png');
    
    return await message.channel.send(attachment);
  } catch (error) {
    console.log(error)
  }
} 

module.exports.help = {
    name:"beautiful",
    aliases: []
}```
```TypeError: (intermediate value).setColor(...).addRect is not a function```
nimble kiln
#

.addRect

torn ravine
#

@wicked pivot use hatebin please

nimble kiln
#

Rectangle? - Yes Rectangle, ignore me. I thought you tried to do some reaction thing 😄

wicked pivot
sweet kestrel
#

I am using python

#

anyone know how to do client delete after a specific time?

#

like client delete after 3 seconds

#

anyone know how to do that?

earnest phoenix
#

in js

#
message.delete({timeout: 3000})
sweet kestrel
#

I don;t use js 😦

earnest phoenix
#

ik

sweet kestrel
#

lol

thick gull
#

do the docs not say anything

sweet kestrel
#

delete this after a specific time

#

anyone?

knotty steeple
#

u can assign that to a variable and try using .delete

#

also anyone use sqlite

#

wtf is BEGIN

dreamy thistle
#

how do you mute members? (voice)

granite echo
#

..

misty sigil
#

yes?

earnest phoenix
#

@sweet kestrel can’t you “sleep” with asyncio and then do the message delete function

knotty steeple
#

u can

cunning ore
#

is there ant programmers here ?

misty sigil
#

all of us practically

knotty steeple
#

everyone here

misty sigil
#

some better than others

granite echo
#

client.users.cache.get(args[0]).kick()
im making a bot list if u havn't noticed already, and i seem to of forgot how to kick the bot when rbl.forcedelete <botID<botOwnerID>> is ran

cunning ore
#

hmmmmmmmmm

misty sigil
#

others absolutely stupid

cunning ore
#

it is for Music

granite echo
#

might help to state error

cunning ore
#

But it is Not working

misty sigil
#

was that copy pasted from JMusicBot or something

granite echo
#

might help to state error

misty sigil
#

does help

earnest phoenix
#

^

granite echo
#

^

cunning ore
#

what ?

misty sigil
#

what error do you get

sudden geyser
#

What doesn't work about it.

thick gull
#

there is nothing but formatting

#

the extra space at the bottom }

#

😩

earnest phoenix
#

Ikrrrr

cunning ore
#

no error But when i type The Prefix , the Bot will not Join

earnest phoenix
#

My ocd

thick gull
#

that is not the bots code

#

that is the config file

cunning ore
#

yup

misty sigil
#

bruh

thick gull
#

did you just copy paste some random bot from GitHub

#

😩

misty sigil
#

yes

#

I believe it’s JMusicBot

cunning ore
#

i dont have any commands

#

ooooooooooooooof

earnest phoenix
#

.

granite echo
#

@cunning ore dont copy code

#

learn it or dont code at all

misty sigil
#

^

#

That’s the way to go

cunning ore
#

ok i copied but i changed everything i mean yt api prefix And others

#

i want commands

granite echo
#

it dont matter

#

u still coppied

misty sigil
#

it doesn’t matter still copied

#

go and get a basic understanding of the language

granite echo
#

if u wrote it u would have less errors then u do now

thick gull
#

do you even know how to start the bot

granite echo
#

and that

#

lmao

misty sigil
#

it’ll make it 69x easier

thick gull
#

that is probably your issue

granite echo
#

prob not

thick gull
#

if it is not responding

#

considering you showed config file and asked why it wouldn’t work

cunning ore
#

nice

#

u guys helped me so much