#development
1 messages Β· Page 1677 of 1
Probs
I have installed phpmyadmin on my VPS.
But when i go to the http://vpsipadress/phpmyadmin i see this:
but all packages was installed
php too
hi
That means that you haven't set up PHP correctly on your webserver
i restart to setup php so
Where's the ad? Because of this, i can't vote.
There was always the "vote after this ad" everyday
Get an ad blocker
how?
Refresh
i refreshed a lot of times
now i have a blank page @pale vessel
While the apache files link well to the phpmyadmin folder
what is the reason for high cpu usage?
On a discord Bot
can i Mongodb Changestream be a problem?
and what happens instead?
have you tried console logging 'sentence'
what message did you test it with
lol
Also you are checking if the message includes lol, not if it starta with it - and you are removing the first word from the message, which may or may not be lol
... of course it's gonna be empty
how do you do that? i am pretty new to all this stuff
a bit
cause I don't think you do
no not really, i know what some lines do
like
message.channel.send(sentence + ", I am dad.");
wow this server is different
i know what this does
Anything else? If not maybe you should learn basic programming concepts like if statements and arrays
and look into the mdn javaacript docs
yea, i am doing that
ok
oh lol, I did something funny
llol
i know how to fix this
if(msg.author.bot) return;
whit this
you should deffo read some guides
ok
i fixed it
What is something that gets said a lot
use .repeat(n)
i used if(message.author.bot) return;
this does that: "if(message.author.bot) return;", right?
I mean
I guess that works
I just hope u r not doing what i think u r
But if it works stick with it
Kek
@opal plank its working again like nothing ever happened
Β―\_(γ)_/Β―
i don't know what u you are thinking but it works
Good enough
Bot for every use case or bot with only 1?
I will revive my old multipurpose bot, I miss him too much, but after that I will create some more modern ones
`const Discord = require("discord.js");
const client = new Discord.Client();
const token = 'Token';
const id = 'bot id';
const keepAlive = require("./alive.js");
keepAlive();
client.login(token);
client.on("ready",() => {
client.user.setActivity("SUPPORT",{type:"PLAYING"});
})
client.on('message', message => {
if (!message.content.startsWith(prefix) || message.author.bot) return;
const args = message.content.slice(prefix.length).trim().split(' '); const command = args.shift().toLowerCase();
if(message.content === ('~>join')){
message.member.voice.channel.join()
.then(connection => console.log('Connected!'))
.catch(console.error);
}
if(message.content === ('!test')){
message.channel.send('im working!')
}
if(message.content === ('!premium')){
message.channel.send('M PREMIUM')
}
let say = args.slice(0).join(" ");
if (!say) return message.channel.send("You have to give a text as well.")
message.delete()
message.channel.send(say)
});`
Anyone please correct and tell please
Whats the problem with it?
it says prefix not defined and a lot of error
Did you copy paste that code
Can you help me by removing all error
Yes
So i am making a website and docs for my bot:
http://zero-one.xyz
http://docs.zero-one.xyz
and i was wondering if you guys have some feedback for them
(yes ik that the discord emb thing at website doesnt work on phone)
i mean of course it complaining about prefix, because its never defined in that code
client.on('message', message => {
const prefix = 'Your-Prefix-Here';
if (!message.content.startsWith(prefix) || message.author.bot) return;
const args = message.content.slice(prefix.length).trim().split(' ');
const command = args.shift().toLowerCase();
i mean you define it
when youre not familiar with it, maybe you should spend some time to understand the language
I am new
Thank you
Mm
i mean when its a not changing prefix you can define it outside of the eventhandler
Me?
yes
you dont need to overwrite a variable with the same value every time an event is fired

any feedback?
The official website is a template so that's kinda meh
k but the looks?
it's ok
nice
and the docs?
not finished yet
but it should have way enough info already haha
anyone uses cloud storage to stores images?
and access through a url?
google could storage to be precise
Cannot insert legacy ACL for an object when uniform bucket-level access is enabled.
There's this dumb error, i dont get it :c
while uploading an image to gcs
from nodejs
if(message.content.includes("@frigid mountain")) {
message.reply("> don't ping my owner")
message.delete()
}
The bot pings it self idk why
your bot is triggering its own message event
also
that feature is utterly useless
you're just going to leave yourself with a ghost ping
^^

I just dont like getting pinged
then ban the user, not delete the message
Lmao
You can't do anything about getting pinged unless you literally leave all servers where you get pinged
hi guys im a starter i know only to create a bot in discord/application nothing else can anyone teach me how to make one pls.....
ok
A Discord bot is just a program that connects to Discord on start and listens to events from Discord while it's online
but can you code?
It being a program means you will have to write code for it
so u cant
u can search on you tube tho
Any particular programming language you'd like to use?
i woould like python or javascript
I suggest python
hmm
I suggest you learn either/both of those first before getting into Discord bots
it is easyer
fastest language possible to use for discord bots?
u can search on you tube tho
hmm
how to code
C++ on a machine hosted close to Discord servers
what
You don't really need that much efficiency in Discord bots though
i ned to know how to start of
Just start with learning Python itself for now
in yt they are showing repl
What do you guys consider the best language to use for a discord bot to be?
hmm
It's personal preferences
Python is by far the slowest out of all languages
Learn Python programming with this Python tutorial for beginners!
Tips:
- Here is the playlist of this series: https://goo.gl/eVauVX
- If you want to learn faster than I talk, Iβd recommend 1.25x or 1.5x speed :)
- Check the outline in the comment section below if you want to skip around.
- Download the sample files here to follow along (th...
You can use SoloLearn as well
help please
It's suggested you use multiple sources to learn Python
start with hello world
where
ππππππππ
what
yup
Code is just text that follows specific syntax rules
i have 10
Those syntax rules differ for each programming language
where what idk anything man ?:(
Do you understand what a syntax is?
nope!
In computer science, the syntax of a computer language is the set of rules that defines the combinations of symbols that are considered to be correctly structured statements or expressions in that language. This applies both to programming languages, where the document represents source code, and to markup languages, where the document represent...
type command
Are you familiar with Computer Science?
i just want to atlest make a bot that says me hello when i say
"shard 0's client took too long to become ready" I get this error. I opened vpn and it doesn't work again
on the app search
idk anything
only about some things
I am
You'll need Google a lot then
hmm
Go over SoloLearn courses for Python
as well as the video from before
i mean can anyone help me make a test bot
wait
i just want to do something before i get further into the lang
It's suggested you go over the very basics first instead of getting straight into Discord bots
Check pinned comment.
Want to make Discord Bot for yourself? Don't want to download thousands of things?
then this video is for you!
In this tutorial, You will learn how to make discord bot without downloading any software.
Also we will cover some basics like ping pong and embed commands
No it's not bot maker or spoon feeder
This is the orig...
P.S. Youtube and Discord bots do not connect well
yeah
Of course it's JS
but it is hard to explain
and Glitch
without videocal
That shit is outdated because INTENTS
Learn what in HS?
read wiki
i went to discord appliction and made a bot
sooo?
CS is introduced generally in HS but I doubt they teach programming languages like Python
I was taught Pascal.NET
man im in 7th rn
right now
and i wanna make bots, code, hack of something, and have fun and earn a bit money
oohhh
hmm
Then I strongly suggest you go over Computer Science basics as well as Python basics
i wanna make a somekinda bot rn
A BLACK HAT HACKER
Discord bots are not the way to get into programming as a serious future career
hmm ik but i wanna atleast do these
Can you shout out my server
then this
No
Please
lol
Did you bother to read the rules in this server before asking
I just wanna help a friend
Then list it on https://top.gg/servers and stop asking here
No one will shout out a server for no reason
yeah
Pls
Did you seriously ignore every word I just said
I do not have discord friends
Yes very much so
Were you never told "no" in your life
bruh
so no shatouts
lol
Please
Then you might've realized by now that we literally said "no" already
that kid is struggling
Lol
lloll
I am just helping a friend
You're not helping yourself OR your friend
Lol
hey guys
Hey how old are you
server shoutout requests here
who knows python
Why
ignores when told to stop
you need to be above a certain age to get a shoutout
/?
I do
@hollow mesa please stop
"Please" aka "I am not willing to listen to 'no's because I don't care about doing things properly and am here for attention"
This dude so negative
also
It's you who's dumb here, I'm just giving you the facts without sugarcoating them
is adding members to development team still broken?
let's keep #development in topic please
You can ask here or use Google
There are resources like StackOverflow and other forums used by programmers
@ripe prairie whatβs up
k
so bassicly
to start i used repl
It's better you learn to be independent and search for answers yourself and then ask if you couldn't find anything
Ok bye
hmm
repl is just an online testing environment
Technically if you cbb to install Python on your machine, it's fine to use it
-m @hollow mesa
π€ Muted Berry#9664 (@hollow mesa)
lol
hmm
what do u mean
how did u start
i wanna be really succesfull
How did I start with Python?
Don't take me as an example, I'm a fucking average lmao
hmm
Just get a hang of Computer Science first, then Python
i doesnt matter coz u atleast know something
From there you can get to stuff like chat bots
What wiki are you talking about
hmm
just research about python and start making stuff you like @arctic epoch
Wikipedia
Wikipedia isn't the only source of information
Plus, it won't teach you Python
Python is an interpreted, high-level and general-purpose programming language. Python's design philosophy emphasizes code readability with its notable use of significant indentation. Its language constructs and object-oriented approach aim to help programmers write clear, logical code for small and large-scale projects.Python is dynamically-type...
Pass Python courses like on SoloLearn
oh
does
hmm k i sec
How does it TEACH you Python
idk
it has a lot of links
it teaches about info like dont expect it to teach python but expect it to teach pythons history
links to other sites
yeah
i just want to know about making a discord bor for now
You could also just search "learn Python" on Google
here
just learn basics of python first btw
This is a fucking disaster, y'all have fun
yeah
We keep going in circles
hmmmmmmmmm
yes
what
You gotta be shitting me
ππππππ
πββοΈπββοΈπ€¦ββοΈπ€¦ββοΈπ€¦ββοΈπ€¦ββοΈ
how do i add co owners on the website?
@elfin shadow how did u get that role?
get your bot verified?
Make your own discord bot in 5 minutes using blocks with no coding required. Try your bot online and export it on your computer or server.
@elfin shadow why u didnt get the badge?
this is not coding
What the genuine fuck is that
he is bot developer
Bot Owner? Right?@earnest phoenix
because it is early developer badge
Oh
Just to add. Getting the badge isnβt related to get your bot added on top.gg
To get the Bot Developer role you own an APPROVED bot on TOP.GG
Verified bots do NOT give badges for MONTHS now
Discord verification does NOT equal top.gg approval
They are not connected
That badge was a mistake
Because it doesn't even help you
What kind of recognition are you gonna get for owning a Discord bot that's in at least 75 servers
know
hmm
Oh no more Bot Badg
he can go to robootics academy
What kind of academy even thinks of Discord bots as something that matters
and get a real badge
Not for discord
just to learn coding
You might as well use all that time learning actual shit that matters instead of wasting time for a badge
yeah
You can self-learn programming nowadays with the internet just fine
but it is a part time job here
Academies and shit are just for degrees that companies have a stick up their ass about
Do we earn anything from discord π?
Loss of braincells
i did that job while in university
What?
And money if you manage to take off with your bot
That was only planned, wasn't it
but it is hard
Was it implemented already
@slender thistle can u do anything with Early Supporter?
u can use coding for better things
Show off that you spent money on Nitro before October of some year
Can't remember if it was 2019 or 2018
Thanks
But hey at least it's an ego boost
Wait yall 1sec
what
It doesn't do anything, it's just there
what
He paid for it
guys
lel
what should i do now
what
i imported discord and os
they don't give it anymore
the bad
now
badge
?
tell me
now what should i do
you could just search for a discord py template
@arctic epoch wait mann
instead of asking step by step
you should learn programming
you want to learn coding or learn making a discord bot
k
ya for now
I swear to God this channel today is an embodiment of clusterfuck
i want to make bots
search for a discord.py tutorial
oh
if you want to use python
Python tutorial sounds better
does user Legit contribute to this phenomena
Yup
@quartz kindle still with Bot Developer badge
let them crash an burn :^)
Has been for the past like 30 minutes
You can do it with scratch if you do not know coding
mhm
Oh you know what Tim
y'all are distracting me
That sounds sadistic
idk any langs bro
Man I Did my Bot From The PHONE
Good idea
wut
i mean any languages
Let them suffer just like I did
languages
I dunno that looks line English to me
ok
then learn one?
my brain gonna be twisted if i stay here for another 5 mins
bruh
u emo
hmm k
just kiding
I've been trying to center an input element for 10 minutes now
noob
:^)
it is, and I am using flexboxes
literally everything is centered except that one input field
You sure that rule isn't being overwritten by something else?
Or position of the parent element?
that's probably what's happening
input fields often have weird padding/margin
you can check that and/or wrap it in a div
zero is having some problems with babel
im trying to run a react app on replit with a nodejs api and i tried to use zero for it
then this happened:
https://paste.gg/p/anonymous/bc6c4c332ad746e294c55161830c48ee
my code: https://replit.com/@code913/blog
any way to fix this?
okay not the input is centered but also full width
is it public or localhost?, if its public i could take a look
db.prepare(
^
SqliteError: file is not a database
at arbitrate (C:\Users\Egemen Gezer\Desktop\Cit_G\node_modules\quick.db\src\index.js:365:8)
at Object.fetch (C:\Users\Egemen Gezer\Desktop\Cit_G\node_modules\quick.db\src\index.js:41:16)
at Client.<anonymous> (C:\Users\Egemen Gezer\Desktop\Cit_G\bot.js:134:22)
at Client.emit (node:events:381:22)
at MessageCreateAction.handle (C:\Users\Egemen Gezer\Desktop\Cit_G\node_modules\discord.js\src\client\actions\MessageCreate.js:31:14)
at Object.module.exports [as MESSAGE_CREATE] (C:\Users\Egemen Gezer\Desktop\Cit_G\node_modules\discord.js\src\client\websocket\handlers\MESSAGE_CREATE.js:4:32)
at WebSocketManager.handlePacket (C:\Users\Egemen Gezer\Desktop\Cit_G\node_modules\discord.js\src\client\websocket\WebSocketManager.js:384:31)
at WebSocketShard.onPacket (C:\Users\Egemen Gezer\Desktop\Cit_G\node_modules\discord.js\src\client\websocket\WebSocketShard.js:444:22)
at WebSocketShard.onMessage (C:\Users\Egemen Gezer\Desktop\Cit_G\node_modules\discord.js\src\client\websocket\WebSocketShard.js:301:10)
at WebSocket.onMessage (C:\Users\Egemen Gezer\Desktop\Cit_G\node_modules\ws\lib\event-target.js:132:16) ```
I have created a new bot, but every time I send a message the bot shuts down and opens and gives the above error. Does anyone know the solution?
you rekt your json.sqlite
did you try to edit it or even open the file
xd
just took a look at .babelrc
i dont see any conflicting plugins
{
"plugins": [
"babel-plugin-react-require",
"react-hot-loader/babel",
"babel-plugin-transform-zero-dirname-filename",
"@babel/plugin-transform-runtime",
[
"@babel/plugin-proposal-class-properties",
{
"loose": true
}
]
]
}
thx @earnest phoenix
wait is it working now
yes
H O W
i deleted the files and it was fixed
you just deleted all your stored data
bye bye data
but you lost all your data
yes and fixed
lol
dont worry
can't be broken if it doesn't exist in the first place :wesmart:
if you use git (like mee) maybe you can revert and get back your file

kekw
im about to draw the left arm of exodia and drop database
you already have the other 4 pieces? damn you're on your limits already
you could ctrl+x them and paste on another file so u do not lose them
and they are cut
h
any halp?
Hey , Can Anyone Help ?
huh
not dev enough to understand the meme?

dunno either, xetera said something about exodia
hmm
code 1
npm ERR! path D:\OneDrive\Bureaublad\mmTest\node_modules\sqlite3
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-gyp rebuild
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@3.8.0
npm ERR! gyp info using node@14.16.0 | win32 | x64
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
npm ERR! gyp ERR! stack at PythonFinder.failNoPython (D:\OneDrive\Bureaublad\mmTest\node_modules\node-gyp\lib\configure.js:484:19)
npm ERR! gyp ERR! stack at PythonFinder.<anonymous> (D:\OneDrive\Bureaublad\mmTest\node_modules\node-gyp\lib\configure.js:509:16)
npm ERR! gyp ERR! stack at callback (D:\OneDrive\Bureaublad\mmTest\node_modules\graceful-fs\polyfills.js:295:20)
npm ERR! gyp ERR! stack at FSReqCallback.oncomplete (fs.js:183:21)
npm ERR! gyp ERR! System Windows_NT 10.0.19042
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "D:\\OneDrive\\Bureaublad\\mmTest\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd D:\OneDrive\Bureaublad\mmTest\node_modules\sqlite3
npm ERR! gyp ERR! node -v v14.16.0
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
Can anyone help me with this error?
install windows build tools
npm i -g windows-build-tools
from an administrator cmd or powershell
wait until it says "all done", can take 5-30min
is it normal that it has been stuck on this for 4 minutes now?
it take times
can you tell me what is wrong
on that game
it is big
i am working on it for 2 weeks
can i have help?
Nobody will read 900 lines of code to guess what's wrong with it
you know what would be pretty cool
go alone again
if you sent a 2k char codeblock with a lang and it was message.lang
I mean if you can't actually ask a more specific question, then yeah sure, maybe keep doing it alone because nobody can actually help you in this case
yeah
Sorry, "here's my entire thousand line projects can you help" just isn't how you get help
ok
e
There's a couple things wrong here, one of them being that your babel dependencies are in dependencies and not devDependencies, which is wrong
that's an actual lang recognised by discord
zero did that
who's zero and why do I care they did it?
It's still wrong
if its a real one
Ok so their app is shit, what do you want me to say?
babel should be in devDependencies
I mean you should, the problem is probably related to the fact that their thing hasn't been maintained, hasn't gotten an update in almost a year, and doesn't work.
Try again but use create-react-app, maybe.
or better yet use the repl.it React template since I'm fairly certain they have one
here ya go use this
i already used them
and they suck
except for the next.js one
and this is a test repl so Β―_(γ)_/Β―
Let me be the one to say the test failed
Clearly Zero doesn't work or doesn't work on repl
Could be
Don't think you can
it says there are two plugins with conflicting names
{
"plugins": [
"babel-plugin-react-require",
"react-hot-loader/babel",
"babel-plugin-transform-zero-dirname-filename",
"@babel/plugin-transform-runtime",
[
"@babel/plugin-proposal-class-properties",
{
"loose": true
}
]
]
}
but i dont see any
It's probably internal in their own files in node_modules
please dont tell me i have to do this:
You can try Zero without installing it locally, thanks to Glitch. Click the button below:
report
@client.command()
async def pc(ctx):
await open_account(ctx.author)
user = ctx.author
pc_data = await get_pc_data()
print(pc_data)
pc_exist = None
if str(ctx.author.id) in pc_data:
pc_exist = True
else:
pc_data[str(user.id)]["level"] = 0
pc_exist = False
print(pc_exist)
if pc_exist == False:
await ctx.send("You do not have a PC, please do \"?pc buy\" to buy a PC")
with open("pc.json", "w") as f:
json.dump(pc_data, f)
em = discord.Embed(title = f"{user}'s' Pc", description = "Use this pc to hack into other's balances and gain money")
em.add_field(name = "PC Commands", value = "?cupgarbe - this will upgrabe your pc", inline = False)
em.add_field(name = "Level", value = "<insert level>", inline = False)
await ctx.send(embed=em)
``` What did I do wrong???
okay
One message removed from a suspended account.
help^^^
Why is it wrong?
What do you mean why you did it wrong? You never told us what's wrong
it doesn't work
AnD WhY It DOeNst WoRk?
idk
What is the problem?
well it doesn't even show in console it just doesn't work
yes
show code?
and try to console.log() the variables that you think it might get problem
@client.command()
async def pc(ctx):
await open_account(ctx.author)
user = ctx.author
pc_data = await get_pc_data()
print(pc_data)
pc_exist = None
if str(ctx.author.id) in pc_data:
pc_exist = True
else:
pc_data[str(user.id)]["level"] = 0
pc_exist = False
print(pc_exist)
if pc_exist == False:
await ctx.send("You do not have a PC, please do \"?pc buy\" to buy a PC")
with open("pc.json", "w") as f:
json.dump(pc_data, f)
em = discord.Embed(title = f"{user}'s' Pc", description = "Use this pc to hack into other's balances and gain money")
em.add_field(name = "PC Commands", value = "?cupgarbe - this will upgrabe your pc", inline = False)
em.add_field(name = "Level", value = "<insert level>", inline = False)
await ctx.send(embed=em)
alr
hi guys my bots ping is very much how can i do it low?
ok tysm
but
?
ur ping will get better
when you optimize your code
not only vps will help your ping
it is like 50/50
wdym optimize code?
Make your code better and faster.
making the code cleaner
anyone know py/python..
yes
looks good, readable and etc. . .
code that "looks good" and is readable isn't synonymous to code that's optimized and fast.
can you help me with this ```js
@client.command()
async def pc(ctx):
await open_account(ctx.author)
user = ctx.author
pc_data = await get_pc_data()
print(pc_data)
pc_exist = None
if str(ctx.author.id) in pc_data:
pc_exist = True
else:
pc_data[str(user.id)]["level"] = 0
pc_exist = False
print(pc_exist)
if pc_exist == False:
await ctx.send("You do not have a PC, please do \"?pc buy\" to buy a PC")
with open("pc.json", "w") as f:
json.dump(pc_data, f)
em = discord.Embed(title = f"{user}'s' Pc", description = "Use this pc to hack into other's balances and gain money")
em.add_field(name = "PC Commands", value = "?cupgarbe - this will upgrabe your pc", inline = False)
em.add_field(name = "Level", value = "<insert level>", inline = False)
await ctx.send(embed=em)
Actually often enough that's mutually exclusive. Not always, but very often.
What's the problem with it?
the command itself isn't working and it suppose to have a leveling up system for your pc which isn'tworking
well yeah true tho
Does it print any of your things at all when you call pc with your prefix?
client = commands.Bot(command_prefix= "?")
``` This?
Yes. So you're doing ?pc in chat and it doesn't respond? Are any other commands working?
yes
All of them
other commands are working but not the ones after pc before pc
after or before pc?
can you rephrase that so it makes sense
^
the ones before pc are working while to ones after arn't working
Sounds like you have an error in your indentation then
^
if anyone knows postgres syntax, I'm trying to use prepared statements and select a column where it's LIKE a value and I'm not sure how to use both the wildcards and prepared index identifiers. I tried LIKE $1% and that gave a syntax error. Any help is appreciated
you see
the trick in making postgresql work is crying
pain fuels your development 
Pass the "%" in with the variable @lament rock
Now, what happens if there's a % symbol in the value with the prepared statement (excluding the ones I pass in there)
Escape them
const Discord = require('discord.js')
module.exports = {
name: 'members',
run: async (message, args) => {
const embed = new Discord.MessageEmbed()
.setTitle("Total Members!")
.setDescription("Total memebers of your servers")
.setColor("#00ff00")
.addField(`${message.guild.memberCount}` + "Members")
}
}
This code was suppose to show how many members are un the server the command is being used in but it doesn't work help pls
Alrighty. That's doable. Thanks
you're not sending the embed.
Oh
I am getting this error, (Trying to convert a v11 bot to v12.)
(node:162608) UnhandledPromiseRejectionWarning: TypeError: fn.bind is not a function
This is the code it is referring to:
In my code:
let gRole = message.guild.roles.cache.find(`name`, role);
In Discord.JS module:
fn = fn.bind(thisArg);
find() no longer accepts the property/value arguments
Thx I forgot that
it requires a function
Ah, thanks.
wtf ads
when i try running an express server
Those are not normal quotes, they look like they were copied from Microsoft Word.
so that's invalid.
I mean it's pretty clear, those red squiggly lines represent code problems π

How do I make command like that
That's an embed
What lib are you using
lib?
library for interacting with the discord API
I'm not using that
π€¨ then what are you using
javascript
so you're not using a library to use the API
you're doing that yourself?
if you are doing it yourself you should know how to do that @frigid mountain
K
.setDescription(sentence.join(" "))``` How can i put this in a ``` ``` box
In a codeblock?
\`\`\`
Content
\`\`\`
yeah like that
The code in the code block is what you have to do
lol
replace Content with the thing you want to put in there
No but its a string
`
\`\`\`
${...}
\`\`\`
`
aha thanks
I have a bot in spanish, so its used by european users, i need to changue the host and i dont know if buying the host in USA or Europe makes a difference, does someone know?
Is it possible to do that in python
The first one looks nicer.
useless codeblocks are useless
I use node.js
Fak
Embeds are doable on any language
just look at the discord.py docs for how to make embeds.
Yea i want to make this command
Ik how to do embeds but Iβm talking abt how itβs showing the users info like. Roles and ID stuff like that
Ok so what's stopping you from doing it?
What specific part of the command do you need help with
The roles
you can get member.roles.cache as a collection of all the roles the member has.
just loop over them
I need some help when it comes to understanding JOIN statement logic in SQL. I'm trying to make it so that people can be searched by nick, id and user tag. This is my current SQL statement with an example prepared array. Currently, it returns 0 rows. I need help fixing any logical issues with it. I have read the docs for joins, but I still can't efficiently wrap my head around the logic:
"SELECT members.id, members.nick, members.joined_at, members.guild_id, users.tag, users.avatar, users.bot FROM members INNER JOIN users ON members.guild_id = $2 WHERE (members.nick LIKE $1 OR members.id LIKE $1 OR users.tag LIKE $1) LIMIT 10", ["papiophidian%", "497159726455455754"]
Do I add that in embed like $member.roles.cache
no you have to actually loop through that cache, probably using .map(), to get back the mention for each of those roles
user.roles.cache.map(role => role.toString()).join(" ,")
Like that
yeah sure something like that
Wdym
... I mean... yes... try it.
hh
never
is it that bad
it's not bad
but why use deno instead of node
The advantages aren't that big of a deal to me
yes
Show what you tried
What's the issue?
Show your CSS and how you write it
Show your CSS
@slender thistle yes
I didn't give you a yes/no question, I said "show"
in live stream
A screenshot or just sending it here is fine
@slender thistle #767074831400960061
That's not css?
i know thats not css but not showing css
It's not showing css, because you haven't written any css
i think he looking for a preview on how it gonna look like
what css do u want to show then
@dusky sundial so know how to show
There is a "Preview" button next to "Save" if you want to preview the page
add style tags to your description
yes
You don't need to tag me after every message bro
tnq
lol, lib getting bigger
@green kestrel you're making a lib roight? and thats it?
@earnest phoenix Is it worth implementing self.dblpy.close() in cog_unload in examples?
Yeah ig, since you don't want the autopost loop to stack on reload
@crimson vapor yeah, a C++ lib to replace aegis in triviabot
I might attempt to learn c++
seems cool
lol
Going from oop to functional can be a big hurdle
doesn't cpp have oop?
yes
C++ was OOP before it was trendy
but in recent standards theyve realised that trying to force OO on every pattern is bad
it supports it, but it's not intrinsic to the language
and have added functional stuff too
by functional i mean std::function, lambda, etc
even coroutines iirc in C++20
i want to have a message object being dispatched to my test program by the end of today
sending a message can wait because that needs REST and rate limit manager
i mean i could hack something in quick, but quick hacks tend to stay
and you dont want a discord lib with no rate limit management π€£
poorly implemented rate limit management can suck as well
yea that seems like pain
yup
rate buckets are a pain
its going to need something with queues, based on buckets
and im going to need something that uses shared memory or sockets to communicate rate limits across clusters
could you force redis?
I need to optimize my bucket manager for memory efficiency and not be so harsh on the event loop
i wouldnt want to introduce a hard dep on redis
ig
basically when i use aegis, different clusters have no awareness of each others rate limits... 99% of the time this isnt a problem because 1 cluster is always responsible for the same set of guilds
but some rate limits are global
i dont use the things that have global rate limits in my own bot
but if im making a lib, its something i must account for
C++ is quite a low level language, it doesnt have built in IPC, you'd have to use platform specific calls
yikes
to either use SHM, unix pipes, TCP, or such
i'll probably go with a shared memory mapped region
with a struct in it
Some libs don't account for inter-cluster or inter-shard rate limits. discord.js for example doesn't have any ways to communicate that kind of data
@slim heart do you #development message
the design of my lib is going to be similar to aegis: process -> cluster(s) -> shard(s)
does c++ have a package manager?
not really a unified one, no
o
are the clusters and shards their own processes or something or does each shard in a cluster share the same memory space
(hint, im not on windows, im only planning to support linux for my lib at least at the start)
all shards in the cluster share the same memory space and have a thread each
epic c++ and linux
the example program spawns one cluster inside a demo process
what IDE do you use?
but technically theres nothing to stop you running multiple clusters in a process either
ide? ew. π
vim moment?
im using vim to develop my lib, but when im in windows i prefer full visual studio
That's smart. threading at that level can be great for people without that much low level knowledge
aegis is threaded too
but its thread model is awful
it uses asio, and i have no clue at any time what the hell asio is doing
it uses thread pools i think, but its implementation is beyond my understanding
and if your event handler takes a while, sometimes it copes ok with it, sometimes it doesnt
in my lib im going to make a quite clear design decision that individual event handlers you attach to shouldnt 'stick around', e.g. none of this stuff like js await... if you want to do something that takes a while, you handle your own threading for it
having clear boundaries between threads makes things a ton easier to debug
like... in aegis, i receive a message.... and its on thread 'N'
a split second later i receive another message on the same shard
and its on thread 'N+54'
like wtf
it means absoluely everything you do has to make copies of data, and have mutexes on it, its a nightmare
sounds like something I don't wanna bother with
Hey, is there a way to check if my bot has permissions in a specific channel? (not just the guild permissions)
If i give it the permission through his role but deny it on a channel it crashes... Is there an easy way of doing this?
That sounds horrific for memory management. Too much overhead
One message removed from a suspended account.
One message removed from a suspended account.
yeah its efficient, but difficult to manage
i did some testing of the caching in my lib
heres what i ended up with
this is 2100 servers
34 megs π€£
admittedly theres some stuff im not caching yet, trivial stuff like emojis
Pretty sure no one caches emojis anyways
intentionally at least
no point in doing so
discord js moment
djs makes a hard dependency on cached content. If one thing isn't cached, everything goes to shit
How can I make my bot to ask for permission?
Like administrator or others
Example mee6:
When u add it, MEE6 ask for what permissions will u give to it
like... this?
theres an invite link creator on your bot's app page. You'd select the bot scope and then add the permissions you want. You'd then distribute that link for people to invite
what are you doing
export * from './structs/Api'
export * from './structs/Webhook'
and this is js or ts?
given that error im going to assume you aren't using ts and didn't compile it
how do I comple it lol?
I have node-ts installed
sorry ts beginner xD
[Kotlin] Is there a better way of writing this? kotlin val name = prompt("Name").let { if (it?.isBlank() == true) { null } else { it } }
This statement defines variable name that prompts the user for information and returns a string. Is there a shorter way of checking if the string is blank to return null else itself?
Ok
so heres how my lib is looking from a user perspective so far....
/* Really simple D++ library test bot! */
std::string token = "A WILD TOKEN HAS APPEARED";
dpp::cluster bot;
bot.on_message_create([](const dpp::message_create_t & event) {
std::cout << "Message received: " << event.msg->content << "\n";
});
bot.start(mytoken);
thoughts?
looks cute
Would use it if it worked on windows as well π’
wait? It is C++ right?
D++?
Discord++? Perhaps
link
[text](link)
click here to go to google
If that's what you're talking about
how to do this
do what
What do you mean by "this"?
How to make a web browser?
We don't know what you mean
https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet @earnest phoenix
ok
yes, D++ is the name of the library, short for Discord++
i didnt want to risk a future branding slapdown from discord inc, so i didnt use their name in the name of the lib π
:0
right now they seem to not care sometimes, if you use the discord name in your stuff's name
but at other times they do
like discordJS... fine....
but some other uses of discord name have been swatted down
so i decided best to come up with something that doesnt have the word discord in it, officially π
lmaoo
yea
@lament rock yes
yay it lives π π ITS ALIVEEEE!
hmm, what to do next.... i could get more events working
or, i could implement rate limit management and REST API and implement a create_message method
uh
then make my test script be able to answer a command as a demo
you're telling me you booted up prod without ratelimits
sure, it cant send anything, so...
its a new discord library without any REST functionality, just websocket
thats an ez way to get cf banned for an hour
not really
oh
its TriviaBot Dev's token, but im thinking it needs its own token
