#development
1 messages · Page 779 of 1
Its still a js engine
🤔
Thats what im saying lol
id rather have a more performant app with 2 processes than one single js app with poor ass performance and gc
I can just try to make a little js engine
Thats what i said, you need a js engine to execute js code, in your example electron is your js engine
Or rather, electron's node.js core
But i can try to make a little js engine electron is big
I see this tomorrow with my new computer
electron with c# oh god get out of here 
@prime cliffyou have an advice ?
Why not stick with C#? Why do you need js in the first place?
For ask botname and put it in not éditable textbox
or you can use c++ and qt 
Transfer the botname to textbox
For style, with rainbow cmd this is more beautifull
👀
personally for me c# is not really good with working with UIs
C# can do that
so i rather choose electron where i can be completely free with the design
to have a more stylish interface
@earnest phoenix c# have thèmes...
you're thinking of UWP
Technicaly, C# should be able to do everything js does, and more. Whatever you want to do with js, c# cn do too, you just need to find how
but UWP is ugly and the performance is poor
and it's windows only as the name implies
Well so far all he said was cmd, nothing about UI lol
Google it?
No the cmd is only for the botname
Yeah Why not
that is the basicest of basics, taking input from the console
I already have only make ui apps
Else with js
Thanks for all
Good night
personally for me c# is not really good with working with UIs
You do realize that some popular apps like ShareX and Insomnia rest client are made in C#
im aware
Also it works pretty daym good for UIs if you use wpf
my goal is to have a performant app with still really good UI and UX experience
Yeah thats where web technology has the edge, with literally 20+ years of UI experience
which... i did accomplish with the method i stated above
Yea but running an extra bowser toolset just for client side apps to look good vs performance is just 
wat
It works well for Discord because they actually have a use for it and have optimized the shit out of it but standalone electron apps will just use up a lot of ram/cpu
The league of legends client lul
you keep forgetting that im using c# which on its own without any optimization still has a really good GC
The lol client is electron? wew
so it's rather not really an issue with resources
Yeah the lol client is a joke lmao
this is what i've accomplished using electron
it would've been really ugly using uwp/wpf
Not to mention its 200+ bugs
and wpf is ooga booga with almost to no async support
Not to mention its 200+ bugs
seen mobile apps yet?
Which one?
android specifically
League's?
Oh lol, im talking about the league client
oh
Like the HUGE server boost messages that never got fixed for a month 
yeah
that sucks too
heya guys remember when teams were released
and discord was like
"fuck you guys" and didn't fix anything for 4 months
Mobile dev is such a pain, i hate that i have to make websites mobile-compilant
sameee
Im much more desktop oriented
Yea especially with tweaking every little bit of css just to actually make it look good on both pc and mobile 😩
Or worse
breakpoints are a pain in the ass
I often need entire sets of divs that only display on mobile
For example, navigation bars with hovers and dropdowns
I just make a separate mobile nav bar with display none lmao
pretty much what i do too
though i've recently started using css frameworks that have the basic elements down for me and i can build my own on top of those
Hello DBL I have a problem and I can't seem to figure it out.
So the log is saying this
/home/runner/SupSup123s-Moderation-Bot/index.js:112
return message.channel.send({
^^^^^^
SyntaxError: Illegal return statement
Aight, I am using this to fetch users in a guild with a certain username, but when there is multiple users with the same username, it only returns one user, so how can I search a server for users with a certain username and discrim?
client.guilds.get("551070196958363648").members.find(user => user.user.username === "Callum")
Add it to your find function
@atomic quarry you have an return statement that isn't allowed, can I see the full code?
Ok
@snow urchin I would recommend using filter and see if length is under 0
ur missing a }
imagine using electron
what
I Kickstarter an app that uses electron and it pays my mortgage still, like 4 years later
I didn’t engineer it though, I had no idea what electron was until i hired programmer
but I designed the application and do all the art for it
Is there a way to fetch the id of the person logged into the discord windows app using a c# windows forms application without needing oauth2 or a token?
tracks = await self.bot.wavelink.get_tracks(f'ytsearch:{query}')
File "C:\Users\culan\AppData\Local\Programs\Python\Python37-32\lib\site-packages\wavelink\client.py", line 100, in get_tracks
return await node.get_tracks(query)
AttributeError: 'NoneType' object has no attribute 'get_tracks'```
why do you just paste your error with no context
async def play(self, ctx, *, query: str):
tracks = await self.bot.wavelink.get_tracks(f'ytsearch:{query}')
if not tracks:
return await ctx.send('Could not find any songs with that query.')
player = self.bot.wavelink.get_player(ctx.guild.id)
if not player.is_connected:
await ctx.invoke(self.connect_)
await ctx.send(f'Added {str(tracks[0])} to the queue.')
await player.play(tracks[0])
return await node.get_tracks(query)
AttributeError: 'NoneType' object has no attribute 'get_tracks'
node is None/null
You have had NoneType errors a lot before, you should know this by now
I don't know if this is the right place, but when will the invite manager bot be back online?
Not the right place, ask in their support server
@blissful scaffold some people never learn; this community has been fucked by people who wanna "program" but don't learn the resources like we did and copied code from GitHub and coming here for help because they don't understand an error that is very self explaintory.
yikes
At least now I can look smart sometimes
I don't mind helping people, as long as I feel like I'm actually teaching them something
eh, I do the same but people just come back with the same error and saying how to fix when we helped them millions of times already
Oh yeah
Then how bout this
What would be the least intrusive way to tell a user that the bot does not have channel write perms
most people would ignore that or send them a DM that they don't have perms
hand written letter mailed to their physical address; sealed with a kiss. (or DM, probably)
When my bot receives a command in a channel where it has no write permissions it just ignores the command. Screw them
that would be the logical way of doing it
Screw em
same except i don't catch the stack i just dump it
I log it in my debug log, it's not a real error so it wont end up in the error log
Thats similar to what i have
I also setup a channel that it logs too
but thats going to be going away very soon...
Cba error messages at 3am from someone trying to use a bot without perms 105 times
my bot has a debug, info and error log
The debug and info logs get archived and reset every day at midnight
At the moment I log every db write in the debug log, but I guess there is no need to do that
Maybe ill just make a channel in my support server where ppl can see specific logs
theres no need, but it looks cool
Nothing like going through your own logs
true xD
I hope
One day, we will be graced with one more thing for messages
Buttons
Could you imagine
Not emojis tho
Like legit buttons in-embed
Or a input feild
At least now I can look smart sometimes
@blissful scaffold true lol
do i need a name and an ID to mess with channel stuff?
no, if you want to get a channel object you dont need both
there should be something like getChannelByID or whatever it is in your library ^^
ligma
anyone here use nodemon?
Anyone have problem with their api ping
You need to provide a redirect uri
@stable horizon done

Now also
Is it a valid one? Like, one registered in the dev panel?
Yes
https://cpojha-discord-bot-list.glitch.me
I was making this

Hey there. How do I go about sending messages through my discord bot using web sockets? I'm using node js
wdym?
Oh wait, I realized that in able for my bot to send messages, I have to do it through a HTTP request
Correct?
Yeah .-?
Sorry, I'm a moron lol
So, do I send an request to a webhook?
And which one?
You don't need a bot for webhooks yeah
why?
uber
I've used discord js in the past
this is development
He's not asking about webhooks
And want to understand how it works
not #memes-and-media
read the discord docs
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
I was, but couldn't find anything. I think I might've scrolled past it
Ah nvm, I found it :)
alright so this code works as intended; the entrance channel is set by the command and when a new person joins the welcome message goes off fine. however, if two servers both have the bot running it gets silly: if i set the entrance channel to booty in server A and channel B also has a channel called booty then the welcome message fires off in both servers, even if the user only joins channel A
how do i avoid that?
Always try to use a channel id if it is possible
i can't figure out how to get an id instead of a name
if the user gives the channel name then request the channel by its name the first time and store the id of the received channel object
i cant find any documentation on getting a channel id from a name
lib?
js
discord.js
let ch = message.guild.channels.find(channel => channel.name == "nia-logs")
let chid = ch.id
🙂
Can I instantiate a new instance a class from within the class? eg
class Yeet {
myMethod() {
return new Yeet()
}
}```
Please ping me with responses, ty
nope maybe 😐
still can't really figure out what i am doing and google has failed me
oh spoke too soon. got it
that didn't work
kept giving me guff about using let
😐 lol why?
because they weren't redefined
Did you try to declare two variables with the same name?
no he did'nt use them
no i was actually trying to get away with just working with the command argument, and ended up using to const instead
lol
That makes no sense, the error you described
ye
looks like i was looking at the wrong log; and let works but the linter hates it
oo nvm
works real good now though thank you
Whats in development?
Programming
Is there any way to hide a property of an object or class from console.log?
I have some stuff that I have to attach to this in a class, but it's big and really makes it ugly when logged to the console
nvm
no
well yes but actually no
it would require some long ass shit to do
wait moose are you making an eval command lol
is it shit form for a bot to send messages to each server it’s on?
what
like if a bot gets an update or new shit, is it bad form for the bot to send a message to each server its on to say something like "I Updated! Here's how:"
Yes
that's what i figured
Generally a bot should never do anything without being asked to
But what you can do, is send a dm with the update the next time a person uses the command
@valid frigate no, it's for my entities for an API lmao
oh
You can make it a private property in node 12+
They made it really ugly tho 
every language has its caveats
They could have just giving it a keyword
@delicate zephyr I would like to do this._{name} = {value}
_{name} would be the private property
I don't even know TS
I can tell
Merge the two, take the things that are good from each side and merge them
¯\_(ツ)_/¯
Like not compiling to js
yea let's just make typescript a different language
where do i go to learn whatever the hell this is?
so you wanna learn regex
not so much learn it, but at least understand what it is
like maybe if there is time when i am dead to learn it? i understand that in the thing i am learning to do that this gibberish tells my command what is or is not acceptable in the arguments for an equation. i just can't parse those hieroglyphics
Ok, I am trying to fix a bug for my upgrade command, but math isn't really my strong point. I want each work upgrade to be 5k, but when they say they want to buy 3 upgrades from level 2-5, it should be 40k, but I just don't get that lol. Anyone good at math that can help me solve this most likely simple equation lol
> const level = 2;
undefined
> const upgrade = 5000;
undefined
> level * upgrade;
10000
``` I'm thinking this but 
OOpS, I meant I want each work upgrade to be 5k more than the last. So level one is 5k, level 2 is 10k, etc. It works fine when they buy them one at a time, but when they buy them in pairs the prices are lower than what they should pay if I make any sense lol
huh
isnt that simple afaik
just take current level * 5000
and do summation
n * (n + 1) / 2
wait
yeah
that's what I did...
tbh just use the more general method
nono thats what not he meant
when math fails you, you add them up manually

money = 0
for (startlvl, endlvl, startlvl++):
increase money by startlvl * price of each lvl
// then just keep adding until you reach the final level
Which is it LOL
I need an idea for economy shit while on PY
lmfao
I was wondering if I could get some help
I am new to this stuff
@vital lark why not, its the easiest way and doesnt need math
sure, what do you need help with
Level System
@fluid basin why use a for loop in any math equations 
not economy lmfao
@vital lark then what, a while loop??
what do you need help with...
Level System
owo
Python
I'm not spoonfeeding you
alright
does augu know python
bruh
why not just make the prefix and command lower case always
const prefix = `o!` || `O!` wont really work
since the first will always be true
if you want more prefixes you can make a array and check it
do you want different things to happen? depending on the prefix?
const prefix = ["prefix1", "prefix2"]
if(!prefix.includes(userPrefix)) return;
How do you find the prefix currently?
from the message
like userPrefix or?
yea you have to get that from the message
its like when i type !help , you want to get ! from the message and check after it
I use this let prefixes = []; let prefix = false; for (const thisPrefix of prefixes) { if (message.content.toLowerCase().startsWith(thisPrefix)) prefix = thisPrefix; }
prefixes
inside the prefixes array
You can use the code i sent
works with unlimited prefixes
I have toLowerCase() in my code
huh
np
Theres an easier way.
That doesn't require a for loop.
const prefix = /^o\!/i;
if (!prefix.test(message.content)) return;
The example you gave leads me to believe you don't actually know what your code does
Putting both O! and o! while your code lowercases the content before checking
O! will never match
If you used O! it'll match the o!
makes sense
yes
ok
bye
which library
js
d.js or eris
d.js
^
alr ty
ty
so like
Client.on('guildMemberAdd', member => {
console.log(`[${b}:${c}` + member.user.tag + 'test'
var role = member.guild.roles.find((role) => role.name === "user");
member.addRole(role);
member.send('', Embeds.autorole)
)};
idk
you can also provide an id for addRole
ye
other than not closing your console.log and assuming Embeds.autorole is a proper embed object that should work yeah
please help
const Discord = require('discord.js');
const db = require('quick.db');
exports.run = (client, message, params, args) => {
client.on("message",message => {
if (!message.member.hasPermission('ADMINISTRATOR')) return message.channel.send(':no_entry: Davet takip Kanalı ayarlamak için `Yönetici` yetkisine sahip olman gerek.')
let davettakip_ = message.mentions.channels.first().id
if (!davettakip_) return message.channel.send(':no_entry: Davet takip Kanalı Ayarlamak İçin Bir Kanal Etiketlemelisin. `!!davet-takip #kanal`')
let gkanal = db.set(`pikachucodedavettakip_${message.guild.id}`, davettakip_)
message.channel.send(`<#${gkanal}> Kanal ayarlandı.`)
})
};```
if (!message.mentions.channels.first()) return message.channel.send(`channel not mentioned.`);
let davettakip_ = message.mentions.channels.first().id;
@toxic jolt use
let davettakip_ = message.mentions.channels.first();
And after
davettakip_.id
Try that
use messageDelete event
Try this out: https://github.com/AnIdiotsGuide/discordjs-bot-guide/blob/master/first-bot/your-first-bot.md
ye I am using that event but snipes are not being written to my file
Why are you writing it to a file anyway
store it in a database and also output it to a channel logs channel...
um how do ye do that? any guides?
If you don't know how to do that I'd suggest looking into something like Mongodb (mongoose), MySQL or postgresql.
oo thanks
They are all types of databases @lofty vine
const Discord = require('discord.js');
const db = require('quick.db');
exports.run = (client, message, params, args) => {
if (!message.member.hasPermission('ADMINISTRATOR')) return message.channel.send(':no_entry: Davet takip Kanalı ayarlamak için `Yönetici` yetkisine sahip olman gerek.')
let davettakip2_ = message.mentions.channels.first();
if (!davettakip2_) return message.channel.send(':no_entry: Davet takip Kanalı Ayarlamak İçin Bir Kanal Etiketlemelisin. `!!davet-takip #kanal`')
let cortex = db.set(`cortexdavettakip_${message.guild.id}`, davettakip2_.id)
message.channel.send(`<#${cortex}> Kanal ayarlandı.`)
};```
i changed davettakip2_.id
^
let cortex = await db.set(`cortexdavettakip_${message.guild.id}`, davettakip2_.id)
read the error
use async function
exports.run = async (client, message, params, args) => {
don't sponfeed pls
thanks
oo
fixed
You don't even need what it returns as you already have the id
lol
so you could just ignore the promise entirely
fixed thanks guys


@late hill they're using the return value it looks like
Pretty sure it returns the value they set it as
Which they already have
Because they've set it
Anyone know who to get a DM channel Id?
which library
@frank wyvern discord.js master: user.dmChannel.id
yeah
thanks
can someone help me out with using this library and discord.js? https://github.com/GreenImp/rpg-dice-roller/blob/master/readme.md#es-modules? i've basically tried every method of including i can think of and i get an error every time
like the readme gives an import instruction for node, but node tells me i can't use import
Because you use require
Theres a section on nodejs
@manic terrace
You may be on an older version of node that doesnt have import which is on v12+ (according to that I actually dont know)
i'm on node 13.7
Oh what error does node give you
throw err, Error: Cannot find module 'rpg-dice-roller/lib/esm/bundle.min.js'
Ah that's just a path error
You need to make sure you have the correct path
Idk if import is from current file or working directory of the app
@manic terrace you trying to import from where the file is in
So it thinks it's looking for $DIRECTORY_WITH_FILE/rpg-dicer-roler/...
easy way is making your own roll system 
feels like that's the opposite of the easy way
i mean you have greater control over everything and can easily add more
i say that with our roll system being like 2000 lines long
xD
haha
i work in RPGs full time and have 0 interest in designing a new roll system in my "for fun time" which is trying to make a discord bot for an RPG i wrote
especially one that's 2000 lines 😩 haha
i mean the Roll system we built does do the following:
- Basics rolls e.g 1d20
- Roll addition and subtraction e.g 1d20 + 4d6 + 4
- Dice multiplication e.g 1d20 x 1d4
- Random Stats for PF, DnD 5e, other table tops
- Keep highest, keep lowest
- exploding dice
- rerolling x times or randomness or any other pre assigned methods
- custom presets
- KH/KL dice average system aswell
- ive forgotten the rest
cuz we're sad like that
xD
haha
rpg-dice-roller does all that except the stats. but you can use it with tracery to roll up an entirely random PC. i used cheapbotsdonequick to make a twitterbot that will make a full level 0 PC for one of my games
it'll also give you random sights in the woods, names, seasons/weather
being someone who has used prg-dice-roller before it doesnt xD
it can do alot
but not everything
xD
i want to be someone who has used rpg-dice-roller but i still can't get it to work
ngl
you could program rpg-dice-roller in an hour and do the same thing
saying that probably less
maybe you could lol, but I tried last night and failed
👏 Regex is your best and worst friend 👏
I gathered haha
got a goin toss workin no problem though, I feel pretty good about that
how can I start .ts files on glitch.com?
probably better off asking glitch
I don't wanna wait lol

Un français de dispo ?
english only
dommage, mais me faut vraiment un français, un peu la flem de parler anglais la

english only
(node:17300) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'guild' of undefined```js
module.exports = async (bot, message) => {
var con = bot.con
con.query(`SELECT * FROM prefix WHERE id = ('${message.guild.id}')`, (err, rows) => {
if(err) throw err;
let prefix = rows[0].prefix
});
console.log(`${bot.user.username} is online on ${bot.guilds.size} servers! `)
var list = bot.guilds.array().sort();
console.log("Szerverek: " + list );
bot.user.setStatus('idle')
let statuses = [
"www.otachan.nhely.hu",
">.<",
"help"
]
setInterval(function() {
let status = statuses[Math.floor(Math.random() * statuses.length)];
bot.user.setActivity(status, {type: "WATCHING"});
}, 4000)
};```
what line are you getting that on
line
which function?
the function you are exporting
wait what event is this supposed to be
bot.on(ready
i got rpg dice roller working, sucks to that assmar
Cool
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'NoneType' object has no attribute 'disconnect'``` i do not get why bc it is in vc
anyone know how i can make a .gif file size smaller
'NoneType' object has no attribute 'disconnect'
You are calling disconnect on a non existing object
what
30 min
async def leave(ctx):
server = ctx.message.guild
voice_client = server.voice_client
await voice_client.disconnect()``` i do not get what is
await voice_client.disconnect()
If you are calling .disconnect on a None, what do you think the value that is stored in voice_client is?
idk
shud it be voice_bot
voice_client = server.voice_client
server.voice_client returns nothing/none/null
so it needs to be await server.voice_client.disconnect()
How
How did you come to that conclusion
Did you actually learn Python before getting to discord.py
yes
Why are people so entitled nowadays

server.voice_client returned None aka nothing
There's no voice client active in the server
yeee but the bot is in vc
Are you sure you are not running some other bot by any random chance
How exactly are you connecting the bot
!play
you can try voice_client_in(server) instead of voice_client
but voice_client is a shortcut for voice_client_in anyways
idk if it'll make much of a difference
async def play(self, ctx, *, query: str):
tracks = await self.bot.wavelink.get_tracks(f'ytsearch:{query}')
if not tracks:
return await ctx.send('Could not find any songs with that query.')
player = self.bot.wavelink.get_player(ctx.guild.id)
if not player.is_connected:
await ctx.invoke(self.connect_)
await ctx.send(f'Added {str(tracks[0])} to the queue.')
await player.play(tracks[0])
``` this is the play command
so it connects
what's the code
where is it defined
👏 This 👏 Is 👏 Why 👏 We 👏 dont 👏 copy 👏 paste 👏 code 👏
ummmmm no ware
bruh what
ctrl+f self.connect_
dude, i gotta ask, how much python do you actually know and why did you copy paste code
@outer niche what piece of code is giving the error
it is saying the bot is not in a vc but it is
why are you clapping hes doing the wrong thing smh
/s
the newist
which is
The newist
Would anyone happen to know how I can install this Bootstrap theme for ASP.NET Core? https://wrapbootstrap.com/theme/right-responsive-admin-template-WB0BLML90
Introduction The Right is pretty simple and useful Bootstrap template that will help you to build the admin panel for your project. Features Fully responsive layout Built with Bootstrap 3.3.7 Include
Copying code is only good when you actually KNOW how every line in the copied code works
copying code is often more work than writing it yourself
Yup
yep
yes it duz worck
no he doesnt
voice_channel
Ok I think he is under 13
i am not under 13
Hm
A. Act like it
B. iirc you sound like it too
Thank you @abstract crow
C. read the fucking docs
LMAO
we want to help but like
what connect_ is
you gotta put effort in
when you should of programmed it
Also we don’t spoon feed it to you
if you actually programmed it instead of C+P you would understand what your code is actually doing
it's not that hard
turtle
@modest maple wut is that emote
what's the newsest
connect_ is to connect the bot to a voice channel You do !connect (whatever VC you want) If you're not in it
cuz its the standard readthedocs site
and @outer niche you have legit just said what the command does
not what the code does
or how it works
this is help vampirism at it's finest
this already happened three times with the same person
you dont even know where self.connect_ even is referenced
@earnest phoenix 4 or 5 atleast
yep @earnest phoenix had issues with him too

ok im high
yep @earnest phoenix had issues with him too
Just another WordPress weblog

I bet you 10 bucks I, a Javascript user, can figure that out by reading the docs
Found connect
obviously he can't
he doesnt
he got told to read the docs multiple times before
yup
was talking to vinnie
although I personally hate the discord.py docs, its still useable
^
Would anyone happen to know about my question above?
Is there an api for mangaupdates?
Its better than any other manga list out there imo
I thought about making one for a long time
In fact i have a manga project thats been shelved for years
Idk when if ever ill get back to it
ive still gotta build the majority of the API back end for the crunchyroll stuff again
so much is broke -_-
Are you parsing a bunch of stuff?
depends on what the query is
overall its pretty simple
basically just a single search term or key word query, get given a uniqueId response
wait for request to come back from an event
for fuzzy searches etc...
but not rlly decided other than send query with key terms
I tried making a search/query thing for mangaupdates, but the problem is that google provides much better results than mangaupdates' own search functions lol
make them have a ddg bang
.>
but this is difficult DISCORD LOGIN OAuth2
what
I'm trying to use a Discord Login to use my bot's dashboard interface just got stuck
login works just can't get data from discord eg EMAIL USERNAME GUILD ETC.
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
thanks i'll see what i can do
i have a lot of this PHP programming
I managed to write a login system, but I have no idea to retrieve anything
@quartz kindle you can search for entires on MangaUpdates, but you cannot get information about a specific manga without scraping the page.
can you show an example (it didn't work for me like 1/2 a year ago)?
actually I was going to post the link but it has nsfw results
Yeah i guess json output only works for searches
I was pretty sure i did it for pages tho, but that was like 4 years ago
i started making a web page for my discord bot where i could set things up on a webdashboard just so this is discord AOuth2 i would have started to write it and so as you can see in the video i have no idea how to get things on discord dev api page but I don't understand anything and thank you very much if you could get a little / bigger help
https://youtu.be/y13BKHEMOmg
Traceback (most recent call last):
File "C:\Users\culan\Desktop\echo\echo.py", line 25, in <module>
bot.load_extension("wavelinkcog")
File "C:\Users\culan\AppData\Local\Programs\Python\Python37-32\lib\site-packages\discord\ext\commands\bot.py", line 623, in load_extension
raise errors.ExtensionNotFound(name, e) from e
discord.ext.commands.errors.ExtensionNotFound: Extension 'wavelinkcog' could not be loaded.```

idk why bc to mee it looks richt
discord.ext.commands.errors.ExtensionNotFound
what about it
ExtensionNotFound
but how it worcked a min ago
Probably because you're giving it the wrong path or renamed the extension file itself
Extension 'wavelinkcog' could not be loaded.
struct Package {
name: String,
author: String,
version: String,
maintainers: Vec<String>, // TODO: Maintainer Struct
dependencies: Option<Vec<Package>>,
build_dependencies: Option<Vec<Package>> // TODO: BuildDep Struct
}```
should build deps be it's own thing
im not sure if it's worth it here
im thinking of having them optionally removed after the install is finished
Hie
Which way is better to code:
Including all events and commands to index.js
Including events to index.js and using command handler for commands
Using events and command handlers
Event and command handlers is the way to go
In nodejs it's relatively easy to do btw
yep
You have the option of classes as well
I am not that good coder xD
@storm wagon https://stackoverflow.com/questions/1150163/stretch-and-scale-a-css-image-in-the-background-with-css-only
You might want to try background-size:cover; or background-size: 100%;
you put the background-size css in the same block as where you have your background image stuff
is there a relatively simple way to remove the first character from an argument?
i tried a few things but turns out you can't just do args[2] - '+'
@storm wagon
.shapes-background {
background: none !important;
}```
?
OH
wait
thius happened
the image went black and white and the only some of the bg filled

<style>
.shapes-background {
background-image: url('https://steamuserimages-a.akamaihd.net/ugc/959724452090823050/C82C997CC035235F8F0889A6AA595C44FF7B57EE/?imw=637&imh=358&ima=fit&impolicy=Letterbox&imcolor=%23000000&letterbox=true') !important;
}
</style>```
did i do something wrong?
For the background use
body {
background-repeat: no-repeat;
background-size: cover !important;
background-attachment: fixed !important;
background-image: url("https://linkhere.png") !important;
}```
You can also add a dark overlay with this
```css
body {
background-repeat: no-repeat;
background-size: cover !important;
background-attachment: fixed !important;
background-image: url("https://linkhere.png"),linear-gradient(rgba(0,0,0,0.5),rgba(0,0,0,0.5)) !important;
background-blend-mode: overlay !important;
}```
oh
thank you
IT LOOKS GREAT! TYSM!!
what's the reccomended size for a background?
There isn't really a recommended size since it can be streched to most screen sizes but just make sure it isn't something too small so the quality is bad
ah
im using 1000x1000
One last thing (sorry to bother you)
How do I add a custom font?
I saw this online for an undertale font: <link rel="stylesheet" type="text/css" href="//undertalefonts.duodecima.technology/webfonts/stylesheet.css">
how would I implement that
try this maybe
....try...?
im gonna try and do it, and if it works, ill let you know how
what im trying now is:
@font-face {
font-family: 'Undertale Papyrus';
src: url('https://cartr.gitlab.io/undertale-fonts/webfonts/papyrus-webfont.eot');
src: url('https://cartr.gitlab.io/undertale-fonts/webfonts/papyrus-webfont.eot?#iefix') format('embedded-opentype'),
url('https://cartr.gitlab.io/undertale-fonts/webfonts/papyrus-webfont.woff2') format('woff2'),
url('https://cartr.gitlab.io/undertale-fonts/webfonts/papyrus-webfont.woff') format('woff'),
url('https://cartr.gitlab.io/undertale-fonts/webfonts/papyrus-webfont.ttf') format('truetype'),
url('https://cartr.gitlab.io/undertale-fonts/webfonts/papyrus-webfont.svg#undertale_papyrusregular') format('svg');
font-weight: normal;
font-style: normal;
}
but with all of them
yes that works
@storm wagon
go here
- Select the font you want
- make sure you add the full source to them
wait @tacit stag do i put that in <style>?
i think so yea?
im still trinna get it to work
yes, at the top of the html piece, put ```html
<style>
/* here */
</style>
whichever one you chose + the full src
which font are you using?
cool 🙂
i needed to put it into .longdescription .content
one last thing -- sorry to bug you lol -- what's the name of the element "description"? I tried .description but it didnt work @tacit stag
wait
and its .bot-info
you trying to change all of the text there, right?
yes
.bot-info{
font-family: myFirstFont;
}```
horrible naming i know 
<style>
body {
background-repeat: no-repeat;
background-size: cover !important;
background-attachment: fixed !important;
background-image: url("https://steamuserimages-a.akamaihd.net/ugc/788613673876117799/CC7E7FC0B6128A87F312520DA5A92381750F4D35/") !important;
}
.longdescription .content{
background: #000000;
color: #ffffff;
font-family: myFirstFont;
}
@font-face {
font-family: myFirstFont;
src: url("https://cartr.gitlab.io/undertale-fonts/webfonts/sans-webfont.woff2");
}
div {
font-family: myFirstFont;
}
.longdescription {
font-family: myFirstFont;
}
.bot-info {
font-family: myFirstFont;
}
</style>``` the whole thing
okay
its ```css
#details #bot-info {
}```
i realized this after i tried to change the color for the title, and saw you need the #details behind it
so fully:
#details #bot-info {
font-family: myFirstFont;
}```
also @storm wagon is your bot named after LiterallyNoOne on youtube?
@tacit stag why yes it is! It was originally made for him
But the project evolved
We're good friends

thats really cool! I love his remixes and originals
Ik!
We're working on this fun undertale translated project
if u want in lmk
im suprised youre not part of the discord lol
ill definitely think about it! can you send a link to the discord?
go to his recent vids, its in the description 🙂
kk
@tacit stag or just click here
@tacit stag o i tried it and it didnt do the thing ;-;
<style>
body {
background-repeat: no-repeat;
background-size: cover !important;
background-attachment: fixed !important;
background-image: url("https://steamuserimages-a.akamaihd.net/ugc/788613673876117799/CC7E7FC0B6128A87F312520DA5A92381750F4D35/") !important;
}
.longdescription .content{
background: #000000;
color: #ffffff;
font-family: myFirstFont;
}
@font-face {
font-family: myFirstFont;
src: url("https://cartr.gitlab.io/undertale-fonts/webfonts/sans-webfont.woff2");
}
div {
font-family: myFirstFont;
}
.longdescription {
font-family: myFirstFont;
}
#details #bot-info {
font-family: myFirstFont;
}
</style>```
lmao i just realized i also changed the header
Can any one help me with the help command
I use node. Js
Pls pls pls pls pls pls pls pls pls pls pls pls pls pls pls
What is the difference

Between python and node
I managed the bot to kick ban
something like this ThatOneCalculator
Bro he finna kick ban me im scared 
And also
@tacit stag what did you get lol
To send donate link
#details #bot-info p,span {
font-family: "MyFontFamily"
}
#details #bot-info .bot-name {
font-family: "MyFontFamily"
}
#details #bot-info .lib {
font-family: "MyFontFamily"
}
@dim flume please take this somewhere else

Wdym
a lot of trial and error
also, the status can be fixed with:
#details #bot-info .status {
font-family: "MyFontFamily"
}
just add this to the bottom
no problem
i realized that it wouldnt change the overall font for some reason, so i changed individual ones instead
You're the best!

Looks snazzy af
@tacit stag only change is dont put the name in quotes
:)))

Heya
i beg to differ that it looks "awesome" because definitely the colors don't go well together
comic sans is an exception because of the theme of ur bot, but id suggest making the colors less intense
id argue its for the aesthetic, but what colors would you reccomend?
uhhh
i mean in terms of the background
maybe less opacity?
doesnt have too be too much but it makes your title & description kind of hard to see
ok
hello
hello
@sinful lotus I have my bot require a whitelist. If you have a testing server I'll add it to the whitelist before you try to invite.
this is a public bot list, if your bot is like only specific individuals can invite it, I don't think its tailored for public usage do it?
@coral trellis what is your thoughts
The goal is to be more community based, like users asking for specific things, and I make it for them.
¯_(ツ)_/¯
That's why I have an approval system.
However, if that doesn't match what's required, I get it.
It's a tailored bot essentially.
Wait for Xig's input on this matter for now, depending on what is his thoughts, we may not accept or accept it, since I personally think public bots should and can be invited by anyone.
If bots are able to test it and you allow others to use it and not restrict it to only your servers then it's fine
If there's a process to get whitelisted it's okay

ok just resubmit your bot and we will review it again once we plow on our queue again
It's hasn't been reviewed yet, I just saw that you were denying others for that reason.
I just wanted to get ahead of the game.
It is there. 🙂
so at least we know that is needed and I won't be guessing why it leaves without any reason
thats why I declined a bot that auto leaves
then thats ok
Awesome.
since at least it says why it leaves
Yep, that's the goal.
Hi I need help with making event handlers
I managed to make command handlers but I am not able to make event handlers
pretty much the same
except you insert the exec function
// load your event
const event = require(eventPath)
client.on(event.name, event.run)
idk how you implemented yours tho so yeah not sure on how you would do it on your case
oo thanks
https://github.com/Deivu/Kongou/blob/master/src/modules/EventHandler.js @lofty vine here is an example from one of my random stuff
probs yo ucan use that as your reference
yea thanks!
I created basic event handlers but how about the dbl events? shall I keep them in my index.js or is there any way of putting them in form of events?
i'll just leave this here. sometimes you just have to write code that makes you go 'wtf'
/* Some moron thought it was a great idea for mysql_real_escape_string to return an unsigned but use -1 to indicate error.
* This stupid cast below is the actual recommended error check from the reference manual. Seriously stupid.
*/
if (mysql_real_escape_string(&connection, out, parameters[i].c_str(), parameters[i].length()) == (unsigned long)-1)
{
/* At this point 'rv' always contains an empty set. Really, we should never see this error anyway but
* it's always better to error check everything.
*/
return rv;
}```
yeah ikr
who thought t hat would be a good idea
whoever it was should be fired
next thing you know its an unsigned long cuz theres literally quadrillions of error co0des
i guess they thought "someone might try and escape a 1tb string... because its a 64 bit unsigned return value representing the length of the escaped string on success.... so its a loss of one value (the biggest unsigned value) at the expense of added complexity to use the whole range"
but really
who would escape a >4gb string?!
i wanna commit non exist now
client.on(eventName, event.bind(null, client));
^
TypeError: event.bind is not a function
No.
eventhandler throws this error
client.on(eventName, (...args) => event.bind(null, client))
(node:17283) UnhandledPromiseRejectionWarning: TypeError: event.bind is not a function
at Client.client.on.args (/app/bot.js:13:45)
at Client.emit (events.js:194:15)
at client.rest.methods.getGateway.then.res (/rbd/pnpm-volume/ce908d90-1591-4e68-8e70-6fd0493443ea/node_modules/.registry.npmjs.org/discord.js/11.5.1/node_modules/discord.js/src/client/ClientManager.js:44:19)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:17283) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:17283) [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.
You know what bind does?
No.
It binds what's passed to the function so inside you can use this.client or whatever arg. You still have to call the function.
The event should be e.g. module.exports = function(){}
oo
fate.readdir("./events/", (err, files) => {
if (err) return console.error(err);
files.forEach(file => {
const event = require(`./events/${file}`);
let eventName = file.split(".")[0];
client.on(eventName, event.bind(null, client));
});
});
this isn't correct?
client.on(eventName, async(...args) => event.bind(null, client)(...args));
Is how you'd use that.
okay
If it throws bind isn't a function... make sure that it's a function that's getting imported.
yea works fine!
(node:17346) UnhandledPromiseRejectionWarning: TypeError: event.bind is not a function
ay this comes up again 😐
Yeah check all your files inside /events/



