#development
1 messages · Page 1220 of 1
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
not all badges are available via flags
^
TypeError: newchannel.setPosition is not a function``` im trying to set a channels position-
see your lib docs and stop making up your own methods and props lol nvm that's djs
https://discord.js.org/#/docs/main/stable/class/GuildChannel?scrollTo=setPosition are you sure it's a guild channel?
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.
whitenames.
Lmao
also using glitch if i'm guessing that correctly 

god im gonna run out of laughs
@misty sigil you are namecolorist
lol
jeez
shit code tol long
preferably in a bin of some type
lol
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);
});```
aaaaaaaaaaaa
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);
aaaaaaaaaaaaaaaaaaaaaaaa
ok
and do you understand any of this code
yes
my disccord keep crashing LoL

what lib are you using
<Client>.user if you want the bot's user instance

<Client> is a placeholder. It represents the instance of the client.
<message>.guild.me is your bot's member
If you named it client, you put client.
Okay!
Hmm
For me it errors
``・Client: ${this.client.user.tag} (${this.client.user.id}),
This is the code
and it says cannot read propery user of undefined
and idk what to define user with
What is this referring to?
yea what is this
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})`,
])```
If that is a normal function then dont use this
show us all of it
this is for classes and bounded functions
preferably in a bin of some type
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})`,
])```
ok so its bot.user.tag
Yeah thats a normal function, there is no this
<client> is a placeholder we said
its a placeholder for the client instance
in your case it is called bot
It still errors
at Object.module.exports.run (C:\Users\hajji\Desktop\Attitude\commands\information\botinfo.js:18:37)```
You have to remove the this
remove this
From the field
so how long till i can test my submitted bot here 
it takes 4+ weeks
i see
it's like discord bot verification at this point
@feral aspen it would be bot, not client, not this.client
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
@feral aspen it would be bot, not client, not this.client
@misty sigil I made is bot.user.tag and it worked!
what is diffrent between this. and without
Doesnt matter how many commands you have
oh then its proply getting in
i do use a bot client to controll his hub
proply is fine tho 🙂
this is usually used in classes, but it can be used outside of them.
@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
const role = guild.roles.find("Member", "Verified");
^
ReferenceError: guild is not defined
can anyone help me with this
you havent defined guild
how cna i get a reddit post title:
im using praw
or msg.guild
im trying to make a lock and unlock command
ih
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
guild.roles.cache.find(role => role.id === '1234')
@open rune can i put its name intead?
yes
its based on code i made for another bot
ok thank you
just try it
also anyone know how i shuld go about making an leveling system
@earnest phoenix just make sure you have proper error messages in case the user lacks permissions. Bots are tested without any permission first
oh yea need to add that
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
mods only
how do i define guild ?
rebooted the bot lets try it
done
the others have it to
but i forgot to make there responce embed

@open rune it's guild's id
wdym for "define guild"
I though he meant the just guild.
i completely forgot
is it
message.guild.roles.get() or message.guild.roles.cache.get()
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
Add a console.log before and after the embed
are you checking for each command?
See if anything is logged in your console
it says
const guild = client.guild.id();
^
TypeError: Cannot read property 'id' of undefined
yes, logs always help you
There is no client.guild
@green bison
like this:
client.on('message', (message) => {
const id = message.guild.id
}
for example
Add a console.log before and after the embed
I'll try that now, ty
add message
it says
const role = message.guild.roles.cache.get("MEMBER", "verified");
^
ReferenceError: message is not defined
to make a lock and unlock command
In which event?
If its a command, then it should be inside the message event
Otherwise there is no message
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
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
Unknown message
how tf did that happen
You tried to edit or delete a message that no longer exists
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
or are those those whack client side cydle/boost/etc messages
That would be awesome ^^
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
Show how you save the money
^
or are you saving under like users_money_17362882
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)```
how cna i get a reddit post title:
im using praw
is it possible to send all the things said in the terminal in a specific channel?
Ah ha
so i should remove ${message.guild.id}?
You can
Depends, do you want money to be global or per guild?
Then remove it
Depends, do you want money to be global pr per guild?
@quartz kindle wait what? we can use global currency instead per guild?
I just...
misunderstanding lol xD
😂
@cinder sandal just remove message.guild.id
using the embed=discord embed
@woeful bluff too late already did
embed=discord.Embed(colour=self.random_color, title='pee size machine', description=f"{ctx.message.author}'s penis\n{random.choice(possible_responses)}")
starting the bot
how can i add a image?
hahha
So I get this error every time I try to install better-sqlite3 but I installed Python... Anyone knows why?
funi
check your PATH
how do i add an imaghe?
Did you restart the command prompt?
check your PATH
@thick gull how?
ty fixed
@quartz kindle tim finally youre here
Find where python is installed @fringe axle
Any idea why quick.db keeps breaking?
Find where python is installed @fringe axle
@earnest phoenix Okay!
Because quick.db is bad
i use it
use mysql2 xd
but is it rly bad?
Then whats better version for it
yeah, I was about to say. I feel as of quick.db is extremely unstable.
@fringe axle did you restart the command prompt after installing python?
I installed Python of the web
@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.
quick.db is simple but.. unstable?
I understand php
it's flaw is being simple
Thats not the location lol
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
Those are just shortcuts
Oh...
oof, I'm not at home and my laptop is super slow...
Also, you should provably install the entire build tools
@drifting wedge I believe it’s “set_image”
how can ur laptop handle windows 10 then
So
Found it
Also, you should provably install the entire build tools
@quartz kindle how?
Open admin powershell
type npm install -g windows-build-tools
Okay
Wait until is says All Done!
Installing now
It will take a while
Depends on your pc and internet
Internet = Good Laptop = Bad
On a fast pc it takes about 5 mins
It's here
On a bad pc it can take 30+ min
OOF...
@drifting wedge If your doing a url for a image it would be “set_image(url=“blah”)”
ok
huh thats weird
Can i use this app? (Phone)
and it has to be awaited
should i change the main file to app.js to use Sequalize for economy commands?
answer me
@misty sigil are you talking about broadcastEval?
Same thing, it returns a promise
my question is ignored
How does && and || being combined works?
Weirdly, give them an extra parens to make sure it does what you want
do i need to rename my main bot file to app.js if i use Sequalize for economy commands?
No
and maybe the database will reset every time
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
@carmine summit dont do that, do what witch said
Is parens inside a parens a thing?
Yes
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
what db should i use for heroku?
it resets the db every restart
I can’t really give hosting advice 😅 I use my own dedicated servers
(a && b) (c && b) (e)
as long as one of those are true
if a and b Is true then that passes
etc
what db should i use for heroku?
it resets the db every restart
@cinder sandal mongo
it is good? or decent?
mongo is about the best you can get for a discord bot imo
Heroku has a built in postgre db
could be because thats literally the only db i use
MongoDB is used by most discord bot list if that gives you a idea.
I wouldnt say most
yo
I dont use mongo
Well
Some
welp, I am using mysql
its definitely based on something noSQL
:^)
Dangggggg
Roast and a half
its true tho
Yeah
@opaque eagle are you using ts?
yeah
set_author(url="someurl")
That is a js error, cant do anything with it if youre using ts
THANK YOU
Not without sourcemaps
You need to figure it out in your ts code and make sure youre extending the correct thing
oh ok
Try it 🤷🏻
Did you click on the author field
?
I'm not sure how my message is unclear
literally try clicking on the author field in the embed that you send
Did you press the author in the embrd
is mongo better than mysql
i thought id be blue
I'm not sure how my message is unclear
I know what you feel lol xd
i thought id be blue
@drifting wedge that's not html xd
cool trying to make a db for my bot
cool trying to make a db for my bot
@cinder sandal python?
discord.js
Wdym
Mongo is not better than mysql
^
They are different, each has pros and cons
MySQL
Its like asking is mac is better than windows
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
😩
lmao
wait till he finds out I’m using light theme
well, It's like you're asking, which one is more expensive, mac or windows
also 1 more question
colour = discord.Colour.blue()
)```
i have a property called random_color
it is quite literally someone’s opinion
how can i make the embed, random color
Unless youre a dictator
hey can anyone explain me what is shards discord.py
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
ohh
thankx man for the help @quartz kindle
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
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('');
});```
Its normal to stay like that, it means the bot is running. Does it not come online?
its not online
ok so
there is no log
You didnt do what i said
that its online
is that 3 messages
all sent at once
i'd advise you dont do that
because ratelimits 👀
its not running anyways
You didnt do what i said about client.login having to be standalone
why is client.login() in a message event
I eval d all my members cause I wasn’t thinking last night now I have a list of 50K avatars 😩
it cant receive messages when its not logged in
@slender thistle
do what Tim said @blissful tinsel
@quartz kindle I installed it successfully. I try to install sqlite3 again
ik
@property
def random_color(self):
return discord.Color.from_rgb(random.randint(1,255),random.randint(1,255),random.randint(1,255))
Looking good
I don't get why it's a property but
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?
random_color()
@earnest phoenix i mean i suppose yes
im logged but bot isnt
put client.login
it does not
outside of the message event
ok
but you are not your bot
i will
djs doesn't know that you're logged in to discord nor does it care
https://gyazo.com/05ad94894997742a29b0a06dafc7a4c8
I fixed it, what do I do now
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: type object 'Colour' has no attribute 'random_color'
with what should i replace <dbname> in the driver link?
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
e.g. database
| collection
the project name?
db
no
make one
how
i maked it online before
ooh now you're asking
@cinder sandal which db are you using?
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
also when i have typed node . i cant type anything other
@quartz kindle mongoDB
but
Atlas or self hosted?
your own cluster or an atlas?
Then the db name should be in your atlas admin panel
is it in the clusters page
@drifting wedge Where's that property located
@slender thistle in the cog
The full connection url should be there,
at the top, before the command
So do self.random_color
under collections there should be a https://jeremy-clarkson.is-inside.me/ATeV6cu4.png button, or an already existing db (https://jeremy-clarkson.is-inside.me/AB0L6zlO.png )
should i click load a sample dataset?
Yes but why would you want that?
cause i have two await message in my bot code
How can I fix this?
Then remove it?
but I still want the message to be sent
Then why do yoi want to remove it?
because when 1 await iss runnnign the second one does not work
that's why i wanna remove the first await
How can I fix this?
Seems like you are sending an invalid ssl cert
You want to send both messages at the same time?
yes
Out of order?
Where did you get your ssl cert from @fringe axle
If you dont mind, then just remove the await
is this right?
Wait youre using py?
yes
For?
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: module 'discord' has no attribute 'self'
but it don;t work
u can'5 remove await in py
colour = discord.self.random_color()
)```
(since 1.0)
;(
discord.py is built on asyncio or something meaning everything requires await
async def asyncfunction(ctx):
await ctx.send("correct")```
Google for asyncio concurrency
:(((
where should i put the mongoDB driver link?
no
ok
The mongodb connection uri?
i can't do const ms = require('ms') ms is declared but it's value is never read.
@wary flame yes
How i can make displayAvatarURL() image bigger
Should be a param for the connection constructor/function
cuz by me it is so small
What driver are you using
node v3.6+ maybe
@earnest phoenix change the size in the image options
how
again nothing works on my error
@blissful tinsel did you remove the login from inside the message?
oh
@quartz kindle how i can change the siez
i will
@wary flame yes
@earnest phoenix check the docs and youll see how
😮 i see
}) //end of your msg listener
client.login('token')
thx
outside
const db = await mongoose.connect('mongodb uri', opts)
@quartz kindle again same thing ocurrs
Show current code
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('')
});```
What
also not logging in anymore
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
Thats not what removing login means
omg @blissful tinsel
i tried without those ''

before but it didnt worked
This @earnest lotus bot stole my prefix
your prefix isn't original lol
a basic understanding of js
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: module 'discord' has no attribute 'self'
client.on("message", msg => {
// YOUR SCRIPT
});
client.login(token)
do this @blissful tinsel
colour = discord.self.random_color()
)```
}); // THIS IS THE END OF YOUR MESSAGE LISTENER
client.login()
ooooh
is it really that hard
Also are we gonna talk about that help command
i use .env, where do i put the dataURL if it needs to be putted intoconfig.json that is worse than .env
yes
@blissful tinsel i fixed this for u already
lets talk about it
you're sending each line as a separate message synchronously
What the fuck
WHY DOES IT SEND 3 MESSAGES
and the if-statement doesn't have a block
3 if the message content is help
2 regardless of the content
only the first send is under the if clause
i use .env, where do i put the dataURL if it needs to be putted intoconfig.json that is worse than .env
@cinder sandal
th it works
your prefix isn't original lol
@earnest phoenix ;-----;
your help command doesnt tho
Anyone here mind helping me with webhooks?
#topgg-api much?
discord.Colour.random_color() if that exists, you might be lookin' for @drifting wedge
if mongo is only for config.json i'm out
it can be done in .env
how
discord.Colour.random_color()if that exists, you might be lookin' for @drifting wedge
@restive furnace that doesnt work
what variable should i use
i tried
whatever the fuck you want
it doesnt matter
it just matters what you put in your code
self.random_color
so no discord.?
I don't see why you would append discord. anyway
if self refers to the class where the command is
by the way, discord.py and python provides really awesome docs, i have used them lately, and they explain everything very well.
No sane person names ANY property/module self
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: TypeError: 'Colour' object is not callable
Then just self.random_color
colour = self.random_color()?
try it and see
Where did you get your ssl cert from @fringe axle
@wary flame I just want to redirect after a discord login
Anyone knows why? D:
Localhost
hmm idk
Someone knows where the Visual Studio Code project properties are?
how can i get the appid of the game whose name is from here
http://api.steampowered.com/ISteamApps/GetAppList/v2
{"appid":940020,"name":"Survive Together"}
response["appid"] where you use a filter to get an object with object["appid"] == 940020
I'm using **Nekobot's ** api but it says embed.image.url: Not a well formed URL.
https://cdn.discordapp.com/attachments/381965515721146390/752208042581557258/182d9b2c2e73c7a2070f3ba4f943ad04.png
Is there a tutorial for json.db
what
the json database thingy
@charred owl debug it then...? inspect your variables and check what you're passing to the embed
bow pro, json is not a database
@hazy sparrow do not use json as a database, it isn't and was never meant to be one
@earnest phoenix how?
How can I enable SSL in Visual Studio Code?
by printing it
hmm this quick.db needs this VS tools which is fking large
by printing it
@misty sigil I read that a setting is there
no
How can I enable SSL in Visual Studio Code?
@fringe axle ssl is not something you "enable"
selfsign one
How? I use localhost
you cant put ssl on an ip
oof
you can generate a selfsigned ssl cert for localhost
But how?
you could've also found this with a 5 second google search
Thanks
how can i make a public bool value?
public bool aVariable = false;
isnt this... csharp?
well you didn't state your language
Java
no that goes with csharp and java
and i have helped you before, that's why i assumed you used java still
'class' or 'interface' expected
java uses boolean
oh yea
what do you actually want to do
Asking about your attempted solution rather than your actual problem
in the beginning of the class..?
oh okay
I'm using a .MessageCollector() and I want to send a message on timeout, how do I do that?
i get an error with mongo: (node:23) UnhandledPromiseRejectionWarning: MongoError: bad auth Authentication failed. is everything right?
no
then what the error means? is the driver code invalid?
I am using discord.py
is there a way to check users inventory?
like if he or she have this item or not
is this correct?
@cinder sandal Your credentials to authenticate with your mongodb driver is invalid
Make sure it's the correct one
thanks will verify the password and db name
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
how can i fix this
was compiled against a different Node.js version using
NODE_MODULE_VERSION 83. This version of Node.js requires
Please include a bot mention or ID
635833307510079490
Aeon
4105
Your ultimate Discord bot with many utilities and API integrations.
discord.js
. (customizable) or mention
469
29
109 Servers | 1 Shards
@pale vessel
: /
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
poh no
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]}
obj["252490"].data.name
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
thx @pale vessel
how can i get someones avatar?
saying to google isnt helping me
i came here for help :/
like as a png?
using python?
i want to do like welcome cards
and i have it all working
you tried .py docs?
but i now just need to get the users pfp into the picture
you tried .py docs?
@sterile thicket yea
it's not there?
What is the commands MB
It's not documented
Send a request to the user's profile picture URL and get the response @drifting wedge
those bytes will be the image
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?
meh, could cache the user's avatar
intresting
was told go here even though topic clearly states bot development not github actions
bot dev optimally, but never restricted to just that
oke
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 ;-;
User is not defined
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
The user doesnt exist in the database
add an if(!user) ?
Show where you add to it
wdym
can one person help me only thxs
Where do you do database.set(user id)
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)
}
user doesnt exist
lol ok
you cant set user.botone if user doesnt exist
it really does
You need to set user first, then you can set user.botone
https://i.callumdev.pw/40gt3.png
Why am I still required to authenticate with git commands although I have setup the required ssh keys
Then show where you set user
Jesus christ lmao
wait we can use Github as a hosting
No
Google github pages
ok
"ur confusing me, find what u need
https://hastebin.com/vajeyuqari.js"
I literally told you the solution
check if user exists
if it doesn’t
then create user
whatever
then i gotta change other stuff to add something else
and have u been actually listening this whole time
have you?
because if u look user does exsist
User is not defined
it started with thus
user is not defined because there is no user in the db
as i said
check if it is undefined if it is then create the user
that is your error
can you not unnecessarily split messages

I’m not a mod
bruh
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```
.addRect
Rectangle? - Yes Rectangle, ignore me. I thought you tried to do some reaction thing 😄
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?
I don;t use js 😦
ik
lol
do the docs not say anything
u can assign that to a variable and try using .delete
also anyone use sqlite
wtf is BEGIN
how do you mute members? (voice)
..
yes?
@sweet kestrel can’t you “sleep” with asyncio and then do the message delete function
u can
is there ant programmers here ?
all of us practically
everyone here
some better than others
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
hmmmmmmmmm
others absolutely stupid
might help to state error
But it is Not working
was that copy pasted from JMusicBot or something
might help to state error
does help
^
^
what ?
what error do you get
What doesn't work about it.
Ikrrrr
no error But when i type The Prefix , the Bot will not Join
My ocd
yup
bruh
.
ok i copied but i changed everything i mean yt api prefix And others
i want commands
if u wrote it u would have less errors then u do now
do you even know how to start the bot
it’ll make it 69x easier
that is probably your issue
prob not
if it is not responding
considering you showed config file and asked why it wouldn’t work


