#development
1 messages Β· Page 1416 of 1
it's not required for everything
all good now;
poggers bro;
aight end
honestly not much lol;
@drifting wedge nvm I didn't find the error lol I had to go kek
o ok
dbClient.connect()
.then(()=> console.log("Connected to Postgres!"))
.then(() => dbClient.query(`CREATE TABLE afkTable(
user_id serial PRIMARY KEY,
afk_msg VARCHAR ( 255 ) NOT NULL,
);`))
.then(() => dbClient.query(`INSERT INTO afkTable(user_id, afk_msg)
VALUES (20227682022769, I am trying to code)
);`))
.catch(e => console.log(e))
.finally(() => dbClient.end())
error: syntax error at or near ")"
ha nub
hey that's not nice
@opal plank ~~ hey fellow postgres supremacist know what I am doing wrong here?~~
oh noted
thats not the issue tho
ofc
I mean, that is async/await
thats just a callback hell
right
await exists so you dont have to chain 30 things
masked callback hell :^)
why you creating a table every time though?
I don't know I am just trying to learn how this works
nerd hehehehe
creating, and inserting
thats legit just SQL syntax
you dont need to create anything everytime
See
INSERT INTO afkTable(user_id, afk_msg) VALUES (20227682022769, I am trying to code));```
also VALUES is prepared statements
Notice the extra ) at the end.
you shouldnt use them like that tbh

I see
It's better to point out the issue at hand, then provide info on the other stuff unless it's not easy to answer the question without
Bruh I have no SQL knowledge or postgres I am noob like you said
Learning SQL shouldn't take too long
Yeah I watched some video
so why use sql if you have no knowledge? learn it first before using it that s always what you should do
Is it nessecary to ALL CAP sql command
think of it as a test
i dont think so for psql
Well to learn I gotta start somewhere
and if you dont learn the material you fail
first issue:callback hell
second: POOL is a thing so you dont have to create connections like that
third: prepared statements should use stuff outside. 'INSERT INTO a (COLUMS) VALUES($1)', [Value1];
fourth: it'll error if a table already exists
no
it's a convention
You can have lowercase, or have it lIkE ThIs
time to bring out that CAPLOCKS
postgres is case sensitive
As you can see I am trying to learn how to create and insert
C#'s capital method name convention scares me
this =/= THIS
Clearly not copied code
well thats good, you could learn more if you take courses or learn the basics via yt or courses just dont depend on yt for everything haha
Yeah I watched videos on YT and at the time I am trying to put that information to test
or that
youtube is bad
I also read docs kek I am just bad at shit
outdated shit, shitty people talking random shit they half know about stuff
bad practices
you got everything that could be bad on youtube
yes
trust the people who made the stuff, docs are reviewed
Right
yeah youtube is mostly people who just read the docs anyways
always
That is correct
my god those docs are beefy
you need both
well, its a proper database
what were you expecting? 20 lines like quick.db?

you really only need to read the first two chapters erwin sent
most docs I've read are not that long even for proper stuff
other than that, its pretty ez
they got like 400 hours of audiobook or something
postgres isnt just DELETE INSERT CREATE UPDATE queries
its a LOT more complicated than you think
relational databases offer a lot more stuff 90% of the people barely look into
postgres specially
yeah
postgres is like LOTR
the one ring to rule em all
postgres offers everything you look for, and more
imo for beginners its better to start off with something lighter, like SQLite. you probably aren't going to need 95% of what Postgres is offering, but this doesn't really relate to the original topic
the ONLY thing you MIGHT, and i emphasize this, MIGHT, need is more speed, which then you'd go for SQL or something like Cassandra
but you talking insane shit speeds there, avarage users wont need it all
none of us owns platforms as big as discord to be able to cap postgres speeds
small flex, i did manage to clog postgres with that twitch slave project
try 4 million viewers on twitch talking at once 

that does the trick
welp, enough flexing, i explained and gave you the info you needed
tl;dr erwin promotes yaml and json databases
Now its up to u
I'll slap u so hard your dog wont recognize ur smell anymore @prisma oriole
i dont have a dog


now that i think about
it
a yaml database sounds quite cool to make
granted its a ginormous waste of time
but its a cool thingie

whats the difference between an .db and .sql?
.db is the binary
.sql is where you write your stuff
though it doesn't need to be called either
ahh ok i see
this isnt related to bot dev again but
let touch = {
ogx: 0,
ogy: 0,
x: 0,
y: 0
}
function touchscreenStart(event) {
touch.ogx = event.touches[0].clientX;
touch.ogy = event.touches[0].clientY;
}
function touchscreenMove(event) {
let x = event.touches[0].clientX;
let y = event.touches[0].clientY;
if (touch.ogx < x) {
keyA = false;
keyD = true;
} else {
keyA = true;
keyD = false;
}
if (touch.ogy < y) {
keyW = false;
keyS = true;
} else {
keyW = true;
keyS = false;
}
touch.x = x;
touch.y = y;
}
function touchscreenEnd(event) {
keyW = false;
keyA = false;
keyS = false;
keyD = false;
}
document.addEventListener("touchstart", function(e){e.preventDefault()}, false);
document.addEventListener("touchend", function(e){e.preventDefault()}, false);
document.addEventListener("touchmove", function(e){e.preventDefault()}, false);
document.addEventListener("touchend", function(e){e.preventDefault()}, false);
document.addEventListener('touchstart', touchscreenStart, false);
document.addEventListener('touchmove', touchscreenMove, false);
document.addEventListener('touchcancel', touchscreenEnd, false);
document.addEventListener('touchend', touchscreenEnd, false);
ive been trying to simulate touchscreen movement
it works on a computer's touchscreen, but for some reason, it doesnt support phone touchscreen
by making a command handler
idk any py
im making a discord webhook
{
"embeds":
}```
one of the parameters is embeds
but
Like
How do I format the text
so its an embed
like
local HookData = {
["embeds"] = "what here?"
}```
how do I format it so it knows what is the title, description, date, etc...?
ik this is djs but there is huge object: https://discordjs.guide/popular-topics/embeds.html#using-an-embed-object
{
color: 0x0099ff,
title: 'Some title',
url: 'https://discord.js.org',
author: {
name: 'Some name',
icon_url: 'https://i.imgur.com/wSTFkRM.png',
url: 'https://discord.js.org',
},
description: 'Some description here',
thumbnail: {
url: 'https://i.imgur.com/wSTFkRM.png',
},
fields: [
{
name: 'Regular field title',
value: 'Some value here',
},
{
name: '\u200b',
value: '\u200b',
inline: false,
},
{
name: 'Inline field title',
value: 'Some value here',
inline: true,
},
{
name: 'Inline field title',
value: 'Some value here',
inline: true,
},
{
name: 'Inline field title',
value: 'Some value here',
inline: true,
},
],
image: {
url: 'https://i.imgur.com/wSTFkRM.png',
},
timestamp: new Date(),
footer: {
text: 'Some footer text here',
icon_url: 'https://i.imgur.com/wSTFkRM.png',
},
};
it shows this except you need to add the quotes
like make it like
{
"embeds": {
"title": "Hi"
}
}
ok gotcha
idk if it's a array or that though
yeah sorry i keep switching language
Im doing this in lua, but it sends the webhook message as JsonEncoded
Can someone help with import commands
local HookData = {
['username'] = "Activity Logger",
['embeds'] = {
["title"] = "Activity Logger";
["description"] = "test"
}
}```
@shy turret this doesnt seem to work
@shy turret fixed it
local HookData = {
['username'] = "Activity Logger",
['embeds'] = {
{
['title'] = "Activity Logger";
['description'] = "test"
}
}
}```
for some reason i had to add the extra {
makes sense since the parameter is called embeds
ok
is it possible to ping someone from a webhook
without knowing their tag or user id
only knowing their username
I don't think so.
Why would you only have their username?
You'll at least need the ID.
im making a roblox webhook
Oh
hi
My code:
const lbmessage = await channel.send(embed)
setTimeout(function(){
lbmessage.delete()
}```
but my message isn't getting deleted
can someone help
errors?
none
@ivory seal then you arent checking the proper console
you didnt specify a second parameter nor did you end the )
Is there a css selector for when the site goes into mobile mode
bootstrap?
@media ?
Like
@media only screen and (max-width: 600px){
/*Here*/
}
Go here for more info
https://www.w3schools.com/css/css_rwd_mediaqueries.asp
@commands.has_role('Support Team')
async def lockdown(self, ctx):
await ctx.message.delete()
home = self.bot.get_channel(701882814219550720)
await home.set_permissions(ctx.guild.default_role, send_messages=False)
await ctx.send("**SERVER HAS BEEN LOCKED DOWN**")```
All right so I have this command and it is removing permissions from the every one roll how can I make it specify my member role
it is discord.py
you literally wrote "ctx.guild.default_role"
i got it now
smh
So how can i get the webhooks to work for voting? Im pressing the test button and nothing is logging out in the console
const server = http.createServer(app);
const dbl = new DBL(client.config.dbltoken, { webhookAuth: client.config.dblpass, webhookServer: server });
dbl.webhook.on('ready', hook => {
console.log(`Webhook running at http://xxx.xxx.xxx.xxx:${hook.port}${hook.path}`);
});
dbl.webhook.on('vote', vote => {
logger.info(`User with ID ${vote.user} just voted!`);
logger(vote);
});
app.get('/', (req, res) => {
});
server.listen(5000);```
and i have the webhook url on the site as http://servers-ip/dblwebhook
remember that you need to submit your webhook url before being able to test it
@unborn perch
I'm having issues with the command prefix. I changed the default to "doom" and added it into my bot code. However, when I try to command my bot, I get nothing. Any ideas?
why is it doing it 30 times
```js
client.on('guildMemberAdd', member => {
const channel = member.guild.channels.cache.find(ch => ch.name === 'welcome');
if (!channel) return;
channel.send(Welcome to the server, ${member});
});
@lucid prawn you may have 30 instances of your bot
wym
events.js:292
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE: address already in use :::5000
at Server.setupListenHandle [as _listen2] (net.js:1313:16)
at listenInCluster (net.js:1361:12)
at Server.listen (net.js:1447:7)
at DBLWebhook._startWebhook (C:\Users\User\OneDrive\Desktop\Kimberly\node_modules\dblapi.js\src\webhook.js:45:18)
at new DBLWebhook (C:\Users\User\OneDrive\Desktop\Kimberly\node_modules\dblapi.js\src\webhook.js:27:12)
at new DBLAPI (C:\Users\User\OneDrive\Desktop\Kimberly\node_modules\dblapi.js\src\index.js:69:22)
at Object.<anonymous> (C:\Users\User\OneDrive\Desktop\Kimberly\Codes\main.js:55:13)
at Module._compile (internal/modules/cjs/loader.js:1200:30)
i suddenly got this error
@amber thistle port 5k is already being used, run netstat -tulpn
aight
is there any way i could make a command DM only AFTER it's been triggered?
Then kill the process by PID
i made a command thats meant to be used in dms
but if they type in chat it catches it as an input in the dm
if(message.guild) return;
You could use a sep message listener?
oh i thought its js nvm
yeah
if message.guild
alright, thanks.
Np
also hum..
hUm?
is there any way you can retrieve a delete bot
kinda got mad and delete it LOL
was in like 30 servers
Bots can't be deleted
When you create a bot ye cannae delete
u can krista
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: NameError: name 'message' is not defined
it only does it once
@pure lion
Oh
Uhh
Hmm
Wait for shivtaco
Don't know enough pie
@lucid prawn strange, can you send your index in https://hasteb.in/ please
ok
ctx.guild should work
ill try it out
yeah that did not work at all
ill wait for shivaco
@pure lion here https://hasteb.in/henelame.js
why is it doing it 30 times
client.on('guildMemberAdd', member => {
const channel = member.guild.channels.cache.find(ch => ch.name === 'welcome');
if (!channel) return;
channel.send(`Welcome to the server, ${member}`);
});
How can I fix this error?
modify it a bit and see if it changes
For example put a . at the beginning
if that changes only on one message, then you most likely have multiple instances running
again
this
pls help me
your agree.js is most likely missing
check your /src/commands/ folder and see if it is there
i checked
@rustic nova
can't help you then, wait for someone who knows what the problem is
ohk
src is folder which has index.js main file
and in src there is one more folder
commands
which has all command files
Hey So How Do I define args.join?
args.slice(0).join(" ")
oh thx
No because you provided us no context
and the full error
We can only tell you something before that first() is undefined
Which is basically what the error told you
@clever vector send code
i swear if they ask that again, i'm going to lose it
Bro
who is ping me
Is it safe to show these things:
Yes
yeah
Ok
Doubt many people care about that but it's safe
that's possible
np
You should link it to ./commands/agree.js instead of./src/commands/agree.js considered the index is already inside the ./src folder
with html, css, php and maybe js
js
try making a general html design first before starting with the mechanics
First of all I want hosting, but I don't know how
I searched youtube
I want to be free
dashboard with free hosting
you're definitely out of luck with that
you will need to pay for hosting a dashboard
I pay for my VPS, where i host my bot on
yes
and most likely a dashboard for my bot sooner or later
@rustic nova You host bot from vps?
Yes
Can you show me how? Because i have vps but i dont know how to use it
you will most likely need a bit of experience with linux (if your vps is linux)
Its not linux
i tried but still same error
there's no free vps
if you really want a dashboard, you will have to pay for hosting
@pure lion ok
let user = message.mentions.users.first() || message.author;
let avatar = user.displayAvatarURL({ dynamic: false, format: 'png' });
let image = await canvacord.Canvas.trigger(avatar);
let attachment = new Discord.MessageAttachment(image, "triggered.gif");
return message.channel.send(attachment);
How to do with Heroku?
Something.Host
I don't know
Can you help?
Hmm
I don't understand
Go to YouTube and search
Dashcruft
And look in his channel
k
mind if you share it where you link it?
βΊ [NEW] HOST YOUR OWN DISCORD.JS BOT 24/7! - 2020! (UPDATED)
If you want to try out another free Hosting Service, Check this video out. People liked this video and its easier to setup:
βΊ https://youtu.be/Vs8IOL-uVq4
βΊ Join into our Official Discord Server! We help people on there too
https://discord.gg/gMxAzs6
LINKS IN THE VIDEO:
1οΈβ£ https://...
Is this?
@clever vector ?
I can do hosting for glitch projects
thx aurel

anyone knows how some bots can react to messages so fast ?
depends a lot on different things. like most frameworks add some latency, there are bots that dont use any framework and connect directly to the api
there is a global api cooldown
Hi
hi
discord js adds 500ms to every request
you can change that in the client options
so every time someone sends a message i check their presence.activity
console.log(message.author.presence.activities)
and i get this https://i.imgur.com/TdyyPJA.png
but if i do (message.author.presence.activities.state) it returns undefined
because it's array what has object(s) inside
if the user doesn't have 6 activites, of course it's undefined/null.
since you accessed the 6th element of the array
oh
ye
im so stupid lol
ye i got it
it was message.author.presence.activities[0].state
hey
i have recently made a !setchannel command
which stores the message.channel.id into data3.json
Json 
json 
let rawdata4 = fs.readFileSync("./data3.json");
let channel4= JSON.parse(rawdata4);
let msg = await message.channel4.send(text);```
UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'send' of undefined
at Timeout._onTimeout (c:\Users\bilal\Desktop\coding\gtamap\program.js:697:46)
at listOnTimeout (internal/timers.js:549:17)
at processTimers (internal/timers.js:492:7)
i know guys, thanks.
use sqlite or some free aviable database like firebase or mongodb
if its temporary you could even use redis
anyway, does anybody know why that error is occuring?
Channel 4 is undefined
define channel 4
thats not how channels work
You cant send by id
You would need to find the channel
And then send to the found channel
console.log(channel4) then console.log(message.channel) and you'll see the difference
or wait
can't i just use: if(message.channel.id == channel4)
for example
and then pass on the code with the normal message.channel.send
first of all console.log(channel4)
its probably not even an id, its likely an object containing an id if you saved it as json
can i have a playing status without a game license
no its the channel name
Yes
rich presence can be set by normal applications amirite?
well kinda, you wont have rich presence but you can set a game to have a name while you play it
ok
if the game doesn't handle rp and discord doesn't either then no rp
@quartz kindle it is an id. And i just used: if (message.channel.id == channel4){
my whole code
}
it worked
thanks for the help boys
not sure that will do what you want, but then again idk what you want
that the code will only send those messages if the message.id is the same as the !setchannel
ah ok
and it worked
i thought you wanted to send a message to that channel from another channel
owh no
thanks !
sorry my question was kinda unclear.
on a website?
How to fix this
TypeError: Cannot read property 'first' of undefined
Codes :
let user = message.mentions.users.first() || message.author;
let avatar = user.displayAvatarURL({ dynamic: false, format: 'png' });
let image = await canvacord.Canvas.trigger(avatar);
let attachment = new Discord.MesssageAttachment(image, "triggered.gif");
return message.channel.send(attachment);
Users is undefined
No, but @quartz kindle will happily help you
@clever vector there's no mentions in the message
hello everybody
so i just update my bot and realised the on_dbl_vote i recently added isnt working
This Is Not Chat
its just not being called
python
oh thanks anw
:(
for people with bad eyes: https://cdn.hopefuls.de/3FnB
does anyone know what class this grey-ish bar is in? https://img.emoji-bot.xyz/O7kibA9G.png
the one at the top
I can tell you in a second, but i recommend waiting with modifying your page for now
xetera said that there's going to be some css-breaking changes soon
sad
I know a bit of python
if you have webhooks set up
@olive rune the Bar is caused by #bot-details-page #details .container
through the border-top parameter
hmm
thanks
i didnt rly get what u mean
you need a webhook listener set up
a cog?
that listens for post requests
teapot language
Thanks tim and Misly
Y'ALL ISTG
The data is sent in keys and not properties REEEEE
It's a dictionary
Nope probably not
Which is why I'm thinking of allowing both indexes and properties
how do you "restart" a bot? node.js can't run a process after killing the first
omg
@pale vessel quick question about canvas
ctx.drawImage puts the top-left corner of the image at the x y co-ordinates right?
ok
Ohhh... thanks
(node:17176) UnhandledPromiseRejectionWarning: DiscordAPIError: Invalid Form Body
embed.fields[0].name: Must be 256 or fewer in length.
wait it still aint working
could it perhaps be a mistake in initialization ?
Show your DBLClient parameters
dbl.DBLClient(DClient, "eyJhbGciOi..")
isnt that optional?
ohhh
Since that requires the webhook to run and listen to requests
with discord.py with bot.guilds always return all the servers that the bot is in regardless of shards? if not then how can i get the total number of servers that the bot is in (not just the current shard)
and how do i get the fields for the webhook
seems like it needs some kind of authorization
webhook_auth is a password you create
and the port?
any port that isn't already used on your machine
and i keep the path as "/dblwebhook"?
top.gg will send you an HTTP request each time someone tests your webhook or votes for your bot
im not running the bot of my machine tho
It's running somewhere
Hey
in my bot, the prefix only works if there's a space between the prefix and the first arg
i want to make it so it works with or without a space
Here's my code
let user = await User.findOne({userID:msg.author.id});
if (!user) user = {userPrefix: "demo"}
const prefixx = msg.content.substring(0, user.userPrefix.trim().length);
const args = msg.content.toLowerCase().substring(user.userPrefix.trim().length).split(/ +/g).slice(1);
if (msg.author.bot) return;
if (prefixx.trim() == user.userPrefix.trim()) {
// ...
}```
i dont understand this
because that's sexy
the name of a field cannot be more than 256 characters long
ok
ok
tnk you
code13 are you just gonna not help me 
meanie
yes
hel!
hel?
p
hM
do you know? :)
well
w e l l
like with panik
the prefix normally is -
but if i changed it to something like
pog
i would have to run commands as pog help
not -help
dude
alrighty
you using serernity?
i said that three times moon
THREE TIMES
YOUR CODING IS DISCORD.JS??
THIS IS A DIFFERENT BOT
-bots
demoman
if(message.author.bot) return;
if (message.content.indexOf(ur prefix i dentifyer ect config.prefix) !== 0) return;
const args = message.content.slice(ur prefix i dentifyer ect config.prefix.length).trim().split(' ');
const command = args.shift().toLowerCase();
remove the ur prefix i dentifyer ect config.prefix
part doe
and put like
prefix or what you have your prefix in
ok ill have a try
like config.prefix process.env.prefix ect
i know
ahh i love process.env.prefix
const { Structures } = require('discord.js');
Structures.extend('Guild', async (Guild) => {
class CustomGuild extends Guild {
constructor(client, data) {
super(client, data);
console.log("Work!");
}
}
return CustomGuild;
});
I got this error:
TypeError: The extender function must return the extended structure class/prototype (received object).
PLSSSSSS
Nope
If you want to talk about api pls go in #topgg-api
lol
sure
someone can help me?
just say
const Guild = .....
return Guild;
Ok Ok Thanks
You need to return the class?
Hey so I'm making a bot which show meaning from urban dictionary
And on reacting next, it would show the next meaning
So the problem is that it works only if the bot reacts
And i'mnot able to figure out how to solve that
What language are you using @gloomy python ?
Would you please send the code for that :)
Sure
async execute(message, args) {
// if (!message.channel.nsfw) return message.channel.send("You can only send messages in a NSFW marked channel.")
let worder = args[0];
if (!worder) return message.channel.send("Specify a word")
let defin = await ud.all(args.join(' ')).catch(e => {
message.channel.send("Word not found")
return;
});
message.channel.send({ embed: generateEmbed(defin, 0) }).then(message => {
if (defin.length < 1) return
message.react("β‘οΈ")
const filter = (reaction, user) => {
return ['β¬
οΈ', 'β‘οΈ'].includes(reaction.emoji.name)
};
console.log(message.author)
message.awaitReactions(filter, { time: 1000 })
.then(collected => {
const reaction = collected.first();
// console.log("this is the reaction", reaction)
let currentIndex = 0
message.reactions.removeAll().then(async() => {
reaction.emoji.name === 'β¬
οΈ' ? currentIndex -= 1 : currentIndex += 1
console.log(currentIndex)
message.edit(generateEmbed(defin, currentIndex))
if (currentIndex !== 0) await message.react('β¬
οΈ')
if (currentIndex + 1 < defin.length) await message.react('β‘οΈ')
})
});
});
}
So what happens is, when I run the command, it shows one meaning, and then the bot reacts the right arrow, and the embed changes to the next one
I think you just need to add && user.id === message.author.id; to the filter
@gloomy python why are you passing in a timeout?
Yes 1 sec
no but whY
well you want it to last for more than one second right?
Why are you using awaitReactions() for pagination 
and the bot reacts first, that's why it stopped It reacts before
No I mean, I would wait for reactions for 1 second
Doesn't that mean that after 1 second the reactions won't work anymore?
But I await reactions after the bot reacts right? So technically the bot react shouldn't count
It can
I tried increasing the time, still the same
You didn't await the react()
Try awaiting it first
You await it to make sure that the bot reacted to it first
Otherwise it can react the same time as you await for reactions

It is
It is
it wouldn't give you that error if that was the case
oops
what is the webhook_path?
i assigned webhook_auth but idkw wts the path
been trying to get on_dbl_test/vote to work
the path is where the webhook gets exposed by your bot
how to enable discord reply feature?
eg yourIP:port/path
you don't enable it, it's a gated feature
on desktop where the quote button used to be
it will come to all servers eventually
no i mean how to make the bot use it
discord.js
not sure if they implemented it yet
no but they did
they're using JDA lol
it's not implemented yet
there's an open PR
if you want it, create a fork of discordjs and merge it yourself
or just request it manually using client.api.channels(id).messages.post(data) with message_reference
hey, is there a way to minify cpu usage of music bot?
- dont use java
- dont use node

- just dont code ever
- don't make a music bot
- use rust
- use C#
^
quick question
after setting up a server on dsl, can I remove the bot from the server?
afaik no
lol
the bot sends statistics to dsl
ah ll
kk*
also are other bots supposed to appear here?
because somehow they don't...
that's in the settings of the server
how to make a bot send random reply?im stuck at this
[Math.floor(Math.random() * message.length)];
Random reply from a list of responses?
yea
why "* message.length"? don't u want to multiplicate it by the array length of your array with responses?
Make an array of responses, then do what your doing in that code clip but with the array.length
ow alr
@old latch iirc they need to be on the top.gg bot list to show.
It was broken a week or two ago aswell.
well they are
alright
Its not on the github, so no idea if its solved yet.
Well, if it was attempted to be solved.
Nobody can use the command even if perm is 0. Can you help me?
What do you prefer?
He's a CS boi
^
errors?
too high level imo
if you really want to squeeze out performance
use cpp and interop ffmpeg binaries
I don't get any errors like I can send the code if you want
isnt the bulk cpu usage from ffmpeg anyway?
i don't think so
@stable loom send
it doesnt matter what language you use to hand off the stream if the culprit is ffmpeg itself
const db = require('quick.db');
const ayarlar = require('../ayarlar.json')
exports.run = async (client, message, args) => {
if(!client.ekoayarlar.admin.includes(message.author.id)) return message.reply(`bunu yapabilmek iΓ§in gerekli yetkiye sahip deΔilsin!`)
const silinecekkllnc = message.mentions.members.first();
let para = args[1]
if(!silinecekkllnc) return message.channel.send(`Bir kullanΔ±cΔ± belirtmelisin!`)
const bakiye = await db.fetch(`bakiyecdare-${silinecekkllnc.id}`);
const hesapdurumu = await db.fetch(`hesapdurumcodare-${silinecekkllnc.id}`);
const hesapismi = await db.fetch(`hesapismiΓ§odare-${silinecekkllnc.id}`);
if(!hesapdurumu) return message.channel.send(`KayΔ±tlΔ± olan bir kullanΔ±cΔ± belirtmelisin!`)
await db.add(`bakiyecdare-${silinecekkllnc.id}`, para)
message.channel.send(`:+1:`)
}
exports.conf = {
enabled: true,
guildOnly: true,
aliases: ['ekle'],
permLevel: 0
}
exports.help = {
name: 'ekle',
description: 'KullanΔ±cΔ±larΔ±n kullanΔ±cΔ± adΔ±nΔ± tarar.',
usage: 'tag-taramasΔ± <tag>'
}``` @pure lion
it's mostly the end user's fault for not using the correct arguments
i know i've handled music streaming with ffmpeg super easily
tbf making a music bot is really simple
ffmpeg can be extremely powerful if you know how to use it
simple if you know what you're doing
for most people, making a music bot is dealing with magic, they have no idea how it works
thank you, i always wanted to upscale my video to 8k
Lol
in reality, there's one line that does all the work in the case of js
@pure lion Did you find the problem
looking**
oke
client.ekoayarlar?
english : settings.json
bot is a Turkish bot and I could not find a Turkish developer @pure lion
ah
not sure
also how does mongoose handle maps? can i just get the doc and then set the new stuff into the map?
if not then how
I think
I guess yes
alrighty
what event is triggered when an user leaves a server?
GuildMemberLeave
oh, thanks
for giveaways and stuff am i able to make an .json file to store data for each server?
ive done it for my prefixes so it should be possible right
hi
import pygame
pygame.init()
screen = pygame.display.set_mode((800, 600))
while True:
pass
gg
send the stack
Repl.it: Updating package configuration
--> python3 -m poetry add pygame
Using version ^2.0.0 for pygame
Updating dependencies
Resolving dependencies...
[AssertionError]
exit status 1
Repl.it: Package operation failed.
this is the erro
and im new to pygame btw i have no idea about anything lol
oh wait nvm
hmmmmm
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
alright i have a command that pushes stuff into a map
2|Demoman | [
2|Demoman | {
2|Demoman | title: 'Mortal Kombat 11 All Fatalities & Fatal Blows on Joker (Killer Smile Skin)',
2|Demoman | url: 'https://www.youtube.com/watch?v=kjk2pscSLpw',
2|Demoman | desc: "On this video I'll be performing All Fatalities & Fatal Blows on Joker (Killer Smile Skin).",
2|Demoman | id: 'kjk2pscSLpw'
2|Demoman | }
2|Demoman | ]
2|Demoman | {}```
this is console output from said command
await theUser.playlists.set(name, client.queue.get(msg.guild.id).songs);
console.log(theUser.playlists.get(name))
msg.channel.send({embed: {
title: "Added yer playlist!",
description: `${theUser.playlists.get(name).map(s => s.title).join("\n")}`,
color: "#FB524F"
}});
```and here is some relevant code
name is a string
Moved back to JS I see
What's wrong with it?
its pushing to the map but not saving
Not saving? What do you mean?
like
also you don't need to await map.set()
I see
if (args[1] == "dev") return console.log(JSON.stringify(theUser.playlists));```
a number

flazepe this is mongoose docs
Autocorrect messed it up
Wow thatβs a lot
:D
they all do roughly the same task but with their differences
serenity is poggest
Like what differences
What's theUser.playlists?
I'd say the first three are the easiest. Serenity is a bit difficult since it's written in Rust. The main differences are the languages it's written in.
language, structure, there being no fucking ws ping under client
playlists: {type: Map, default: new Map()}
theUser is just a mongoose document
Agreed. I know java, I just still need to learn how to store information into files. (I know how to write to files but Iβm talking like json) but python is just my fav language cuz itβs more visual.
F#
@pure lion #development message
I like using Python as my main scripting language over JS. I know Java but not that well
A model?
i pressed f1 shitshit
F# is a language I believe.
Wait⦠JavaScript is a scripting, oh wait yeah
I knew that
yeah, just a doc from a model
Just try
Hey can anyone help me, i am trying to make an express verification system to verify users, like when I press an "verify" button the bot gives the verified user a spesific role to spesific guild. But the problem is that I have no knowledge how to assign a role to a particular user in a particular guild.
I have already tried to define guild with client instance, and member with members.cache.find method. + I only get one error in console which is Cannot read property 'roles' of undefined
@pale vessel how would i do this 
How do you store your stuff
Model
const User = Schema({
userID: {type: String, index: true, unique: true},
blacklisted: {type: Boolean, default: false},
bal: {type: Number, default: 0},
userPrefix: {type: String, default: "demo"},
cooldown: {type: Number, default: 0},
playlists: {type: Map, default: new Map()}
});```
So model.findOneAndUpdate({ userID: <id> }, { playlists: <updated map> });
(not sure)
Worth a shot
poggers it was .set and then .save
await theUser.playlists.set(name, client.queue.get(msg.guild.id).songs);
await theUser.save()
poggers
#development message should work too though, I think
i just did the ultimate funny
Hi
I can't make my bot online.
It was online when I closed my pc.
But I opened it again. But I can't make it online.
Pls help me
There isn't an error in logs.
But it doesn't go online.
I regenerated my token two times.
Still doesn't working.
https://hasteb.in/hodiheto.js why guildMemberAdd event is not working? :/







Help!






