#development
1 messages · Page 1291 of 1
then you have MIT which is basically do whatever the fuck you want with it
check this out
Non-judgmental guidance on choosing a license for your open source project
But I want credits for it
what would be the right one for this?
A short and simple permissive license with conditions only requiring preservation of copyright and license notices. Licensed works, modifications, and larger works may be distributed under different terms and without source code.
yes, with MIT they must preserve the copyright and license notices
unless they heavily modify it
Idk what those terms mean one sec
How would I get a hex value as input from a user (#ff0000) and then convert it to type hex (0xff0000) and then store it into json? I'm using Discord.py
Well I guess I'll go with MIT then, if that's what you suggest
I think the int type has a second parameter to set the radix (int(hex_string, 16)).
the regular GPL is the same but only applies to distributed code (downloadable), not for hosted code
@quartz kindle so with GPL, the user can edit it in private but if they want to publish it, they need to make the source code public?
yes
they can use it privately as a server or even offer a service based on it, but they cannot offer a downloadable closed source program with it
they can still sell it tho
ok I think I got it
how could i get a specific guild in djs
yep
alright thanks
imagine someone said ()[] as a joke
[][]
so im making a leaderboard and im getting the money from the database, but im not sure how i could display the users name
ejs and djs
do you have their id in the database?
yes
use the id to fetch them
if they are all in the same guild, you can fetch multiple members at once using guild.members.fetch({user:[id,id,id]})
forEach + fetch 😳
maximum of 100 members right?
forEach + fetch 😳
@pale vessel yes but how would i then place the right username with the money
my brain isnt developed enough
yes it does
so ```js
for(let index in result) {
result[index].name = guild.members.cache.get(result.id).displayName
}
assuming you have all members fetched before that
hmm
app.get('/leaderboard', function(req, res) {
Money.find({serverID: 'REDACTED'}).sort([['money', 'descending']]).exec((err, result) => {
const guild = bot.guilds.cache.get('REDACTED');
guild.members.fetch();
for (const index of result) {
result[index].name = guild.members.cache.get(result.userID).displayName;
}
res.render(__dirname + '/views/leaderboard', {user: req.user, users: result});
});
});
you need to await the fetch
.
im fetching all the members from that guild
also, change the of to in
i made it an async function
can u help me? i want do delete an embed after a reaction. i tried with message.delete but it doesn't work.
ah right
const getMusicPlayer = client.musicPlayer.get(message.guild.id);
let track = 0;
switch (reaction.emoji.name) {
case "1️⃣": track = tracks[0];
getMusicPlayer.queue.add(track);
message.channel.send(`${track.title} a été ajoutée à la playlist :musical_note: !`)
if (!getMusicPlayer.playing) getMusicPlayer.play();
break;}}```
i want to put something here to delete my embed pls
.setAuthor(message.author.username, message.author.displayAvatarURL())
.setDescription(`Voici les 5 premières recherches pour \`${q}\` :musical_note: `)
.setColor("#0000FF")
.setFooter(`Commande Play - 10 seconds to choose `, message.author.displayAvatarURL());```
wat
messagevariable.delete(embed);?
no
nah
delete the actual message
ah with var instead of const?
let smth = await msg.channel.send...
const xyz = message.channel.send(embed)
xyz.delete();
await playmsg.react("1️⃣");
await playmsg.react("2️⃣");
await playmsg.react("3️⃣");
await playmsg.react("4️⃣");
await playmsg.react("5️⃣");
await playmsg.react("❌");```
playmsg.delete();
ok thx
@honest perch what's ur problem
show error
how can I write to a log file without having to recreate it every time?
how can I write to a log file without having to recreate it every time?
@grave smelt read the file => add a few more lines describing your current log => overwrite the whole file

what
wdym
misly show more code
dafuq u doing lmao
exec(async () => {})
my brain
dafuq u doing lmao
@quartz kindle yes
@honest perch restart your IDE that'll fix 99.99% of weirdass errors
lmao
that means the user was not found
why was the user not found
did you await the fetch?
is the guild id the same as the serverID in the find function?
yes
no
here
the other way around
yes
result[index].name = get name of result[index].userID
what
def allowed_to_use(ctx):
return ctx.author.id in bot.blacklisted_users
@commands.check(allowed_to_use)```
Raises this error :
```fix
Ignoring exception in command ping:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 892, in invoke
await ctx.command.invoke(ctx)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/discord/ext/commands/core.py", line 790, in invoke
await self.prepare(ctx)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/discord/ext/commands/core.py", line 744, in prepare
raise CheckFailure('The check functions for command {0.qualified_name} failed.'.format(self))
discord.ext.commands.errors.CheckFailure: The check functions for command ping failed.```
man im confused
idk
this is a bruh moment
yes
whose userID are you grabbing
every userid in the db
it's in a loop
index is one of every members
result.userID would be invalid since there's no property called userID inside result
it's inside result[index]
mhm
just like how you got the name
the id can be fetched the same way, with a different property
the index
result.userID is wrong
it would be result[index].userID
i'm trying to explain it to you in a way that you would get it on your own but i failed
this is the index
you're looping through the indexes
mhm
so for that part would it be ```js
result[index].name = guild.members.cache.get(result[index].userID).displayName;
yes
that still returns TypeError: Cannot read property 'displayName' of undefined
could you guys rate my new help command?
that can get very big
oh you're not talking to m3
i was
app.get('/leaderboard', async function(req, res) {
Money.find({serverID: 'redacted'}).sort([['money', 'descending']]).exec(async (err, result) => {
const guild = bot.guilds.cache.get('redacted');
await guild.members.fetch();
for (const index in result) {
result[index].name = guild.members.cache.get(result[index].userID).displayName;
}
res.render(__dirname + '/views/leaderboard', {user: req.user, users: result});
});
});
ah I see
what about the leaderboard page
<% users.forEach(function(user){ %>
<%= user.name %>
<% }); %>
but that doesnt error
its only the server side code
that errors
@compact oriole i saw you mentioned some hosts in #topgg-api and i'm curious about galaxygate since that is the cheapest one that fits my needs the best
@honest perch then do this ```js
for (const index in result) {
let member = guild.members.cache.get(result[index].userID);
if(!member) { console.log("user not found:", result[index]); continue; }
result[index].name = member.displayName;
}
maybe one of them left the server?
What does shards mean?
Well GalaxyGate is reliable
and at least the first dedicated plan gives a /48 ipv6 block
@quartz kindle @pale vessel thanks for the help 
i don't have a domain or anything, what should i put in this hostname section? it says it's mandatory
its just the name of the machine
where is that @dense patio ?
on the purchase page
@molten charm a shard is a connection to discord. they only allow each connection to have 2500 guilds, so if your bot has more guilds than that, it needs to start "sharding", which means splitting itself into multiple connections, each handling a specific number of guilds
"Configure"
oh
how many servers are there is the question
is termius cheaper
termius is a ssh client
wait
termius is a ssh client
yeah i just saw
same lmao
i use mobaxterm ¯_(ツ)_/¯
sftp is great on it
terminus > termius
they aren't even similar 
lmao
isn't terminus the android thing?
what's the easiest way to transfer everything from my old server to this new one
im guessing its this? https://github.com/Eugeny/terminus
oh
what's the easiest way to transfer everything from my old server to this new one
@dense patio
sftp
@quartz kindle ima check out terminus
is gcp better than galaxygate
yeah i've been using it for about 10 months or so but the prices are crazy
i would be spending like 5 times less if i switched to galaxygate
at the same time, however, i trust gcp, and all of my bots are on it
what is code of total guild members i want to set in playing activity
bold won't make your question get answered quicker
hehe
what library are you using?
you can either grab cached user count or accumulate all guild member counts
combining all guild member counts will have duplicates
i using node 12.0.0
that's not a library
i'm guessing he uses discord.js?
yeah
yikes a help vampire

that's not a library
@dense patio then iam noob
me biggest noob iam biggner
jeez
how use js?
pray to god that he teaches you
it's an ancient skill
pls tell
i see
how to check library
you should... know
check your code
@dense patio which tier are you using on gcp?
tier?
like which plan, how much ram etc
what is code of total guild members i want to set in playing activity
well here's this
ah, ye those are expensive af
jesus christ
i get a discount for having it online all month but still
i pay $3 for all my bots
hm the galaxygate option that was closest to mine costed $16 a month
the problem with gcp is that lower end units have horrendous disk speeds
how much ram does gcp's free tier have
600mb
ok nevermind lol
xD
so would it be worth it to switch to galaxygate?
doesn't sound so bad if you have a lightweight bot
google has super high quality servers, they don't oversell and don't cram in a vps on a shared machine
...but that shows in the price
@earnest phoenix Hlw
yes it would, however you may also want to check some alternatives, galaxygate sometime suffers from weird downtimes
i have several bots on 1 vps and one of them is really big and is very resource intensive
stop pinging me i don't care
if you're ok with being located in europe, check out hetzner and contabo, they are one of the cheapest on the market
@earnest phoenix mt maan maa chuda
not contabo
their machines are not high quality, but they give you more bang for the buck to compensate
hm
i don't speak caveman
ooga booga
not high quality
yes because shitty quality
look at the docs
i only use google for their free tier, everything else they offer is way too expensive, no matter how good
let knpermissions = knallPermissions.filter(p => { return knMembro.hasPermission(p) }).map(p => `\`${permissoesJSON[p]}\``).join(', ');```
not in a json file of course
if your bot isn't super big i'd recommend going with providers like galaxygate
for bots like rythm it makes sense because to use google because of their reliability and some out of the box ddos protection
error in haspermission
help pls
@earnest phoenix show permissoesJSON
so i'm looking at hetzner and there's a lot of specific products that are confusing me
cloud, dedicated server, and managed server
what's the difference
cloud is a vps
dedicated is a physical machine
managed = they do everything for you, and you just pay
dont bother with managed
would cloud work? it's the cheapest by a long shot
yes, what you have in google is the same as cloud
oh nice
cloud is great
well these prices are pretty much the same as galaxygate
i heard they were owned by bluestacks and yah that
its owned by bluestacks
i heard they were going around offering to buy people's bots
you are the product in this case
sounds scummy
you're better off freelancing as an independent dev
i heard they were going around offering to buy people's bots
@quartz kindle ues
they bought bots
and are using them to collect data
as in their policies
Hmm interesting
at least in their old policies it allowed it
lol just reading their tos makes them seem scummy
By just applying to their services I won't lose my copyright for my bot right
Ah true
I feel like it's just an opportunity for bot developers to grow their bots, maybe I'm just not seeing what you're seeing
Ah gotcha, yeah I feel like it's just very similar like a musician signing a contract with a recording label
@quartz kindle lets say if the user left instead of showing a blank name how could i replace it with another value
||
@earnest phoenix doesnt work
you can also still fetch the user regardless whether you have a shared guild or not
smh
you mean inside a string when referncing the user name if it's blank you want to show smth else?
this will work:
`Username: ${username || "smth else to show when blank"}`
right now i have result[index].name = member.displayName, doing result[index].name = member.displayName || 'something' wouldnt work
()
wut da fork
wait
what are you doing
what's your problem in the first place
lol
@honest perch LMFAO you're just decaring a variable with value as a function object instead of running the function 
wtf
that's a falsy value
https://discord.js.org/#/docs/main/stable/class/Client?scrollTo=users
https://discord.js.org/#/docs/main/stable/class/UserManager?scrollTo=fetch
like i said above, you can get a user regardless whether they left or not
@honest perch if you're still using the code i gave you, then it wont work because the code is skipping the loop when a user is not found
json stringify the string then console log it
but if they left i'd just suggest throwing them out of your database
so you need to change it accordingly
because it might be \u200b
which js does not detect as falsy
discord does not allow zwsp as username or nickname anymore i think
they patched it ages go
discord does not allow zwsp as username or nickname anymore i think
@earnest phoenix wtf
i set my name as that
and it works fine
i
LOL
lemme quickly revert bac
5head
im guessing it would be easier to delete the document on user leave
please don't
huh
because i sometimes test leave and rejoim servers and if for whatever fucking reason i add your bot i don't want my stuff to be reset everytime
add a 7 day timer before deletion and if the user joins back within that time don't delete the document
its a private bot for an org
emphasis on whatever fucking reason i add your bot 
gtg brb from the store in five minutes
Alot of the thumbnail gifs i use always break.. how do i make these work properly?
make sure the image url you're supplying is correct
you're at the mercy of discord and your internet
the poo means it's a valid image, the request to it just failed lol
visual code no work
@quartz kindle i achieved it
make sure the image url you're supplying is correct
@sudden geyser I use ingur to host the image and use their direct link.. some work some dont
because its not logging in
yikes
you a) barely blured the token
b) you defined the token but havent used the variable
do you know javascript
please learn javascript
learn atleast the basics
make an easier project
then try and come back
mbnn
can any selling nitro?
Please please please I don't like to say this often but PLEASE learn JavaScript ITSELF FIRST
wtf lol
We don't sell Nitro
deja vu
im stupid but i know how to define things 
reading that code is a trip
"ready," 😳
I genuinely hate to say this but you are going to struggle A LOT continuing to make a Discord bot with no knowledge of the language itself
dont hate to say the truth
I prefer not to be an annoying ass about it but this is just bugging me on all levels of irritation
@commands.command(name="Kick")
@commands.has_permissions(kick_members=True)
async def kick(self, ctx, user: discord.Member, *, arg=None):
author = ctx.message.author
x = await check_logging_channel(ctx.guild.id)
xx = self.bot.get_channel(x)
embed = discord.Embed(name="MEMBER_KICKED", description="", color=discord.Color.blurple())
embed.set_author(name="MEMBER_KICKED:\nMember Kicked Successfully")
embed.add_field(name="Kicked by: ", value=f"{author.mention}", inline=False)
embed.add_field(name="Kicked: ", value=f"<{user.mention}>", inline=False)
embed.add_field(name="Reason: ", value=f"{arg}\n", inline=False)
embed.set_thumbnail(url="https://i.imgur.com/ZPFYGfc.gifv")
await ctx.send(embed=embed)
Image doesnt want to load.. imported from imgur..
Anyone recomend a different host for pics?
.gifv?
uh try to use .gif instead of .gifv
gg
gif video
@split hazel ad spam, see logs
const Discord = require('discordjs')
const bot = new Discord.Client();
const token ='YOUR_TOKEN_GOSE_HERE';
const PREFIX = '!';
bot.on('ready,'() => {
console.log('THE BOT IS on! i am ready to be used')
bot.user.setActivity('!help created by sid62',{type:'PLAYING'}).catch(console.error);
})
bot.on{'message', message => {
let args = message.content.Substring(PREFIX.length).split(" ");
switch(args[0]) {
case 'invite':
message.channel.send('https//discord.gg')
break;
}
})
bot.login(token);
i now see a january first 1970 message
what
have you even read what we said
please don't repost that
@leaden flame if you want to make a bot, you need knowledge on a programming language. There are many resources you have to learn the language, such as https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide if you like reading a lot.
which one
gahh nevermind

LOL
If someone is annoying and/or being a dick, block and move on
~~ shivaco the ignored, 2020
@carmine summit are you here to laugh at people or be helpful?
🙃
Thank you very much
@slender thistle please suggest a rule that bans where people like the person above with the {) syntax who dont know anything about the language theyre using
No
lmao
So let's ban people for being new to programming then
@slender thistle please suggest a rule that bans where people like the person above with the {) syntax who dont know anything about the language theyre using
@earnest phoenix NO
lol
We all started somewhere. I think it's better you guide those people rather than shit on them for their lack of knowledge
🙃
you're missing a comma bro
We all started somewhere. I think it's better you guide those people rather than shit on them for their lack of knowledge
this
Those are punished accordingly
Alright then
are you telling shivaco to ban people who were me from january
Never seen that happen but 
because i wasn't a programmer before January
We're here to help as best as we can, EVEN IF users are stubborn on not learning
Last time was 2019 😂
i swear there's always this topic here at least once everyday
Well you have to be an exceptional idiot to be muted for help vampirism
Hm
i have zero bans currently in my server because i don't allow dicks in
unlike DBL
Ok
you have zero bans on your server because it is small
I bet thats what she said
At least it's not as bad as it used to be back in the days. Most hostilities are either shut down and moved elsewhere or are reasonable enough and are borderline civil. /shrug
In any case, woohoo this is #development
ok
(Joining on the off-topic train)
// how the hell can i do:
require("phin").unpromisified();
// if
require("phin")();
// is a valid function
// you can't get properties of function objects right?
(this extra line is here so discord doesn't display code blocks terribly on mobile for no fucking reason)
@.Tim#2373 halp
@quartz kindle if you're not busy? ^
else if (command === 'reminder') {
let messagez = args.join(' ');
if (messagez.length < 1) return message.channel.send('Incorrect format. !reminder <minutes> <message>');
return new Promise((resolve) => {
if (!isNaN(messagez[0])) {
const time = parseInt(messagez[0]);
if (time > 2880 || isNaN(time)) return message.channel.send('Maximum time is 2 days (2880 minutes)');
if (time < 1) return message.channel.send('Time must be at least 1 minute.');
setTimeout(() => {
message.reply(`Remember: ${messagez.split(' ').slice(1).join(' ')}!`);
}, time * 60000);
const minutemessage = time === 1 ? 'minute' : 'minutes';
return message.channel.send(`Reminding you in ${time} ${minutemessage}.`);
}
const results = chrono.parse(messagez);
if (results.length === 0) return message.channel.send('Error parsing date. Try using format: !remind <minutes> <message>');
let endTime = moment(results[0].start.date());
const currentTime = new moment();
let duration = moment.duration(endTime.diff(currentTime));
let minutes = Math.round(duration.asMinutes());
if (minutes < 1) {
if (results[0].end) {
endTime = results[0].end.date();
duration = moment.duration(endTime.diff(currentTime));
minutes = duration.asMinutes();
}
if (minutes < 1) {
return message.channel.send('Time must be at least 1 minute.')
}
}
if (minutes > 2880) return message.channel.send('Maximum time is 2 days (2880 minutes)');
setTimeout(() => {
message.reply(`Remember: "${messagez}".`);
}, minutes * 60000);
const minutemessage = minutes === 1 ? 'minute' : 'minutes';
return message.channel.send(`Reminding you in ${minutes} ${minutemessage} for ${messagez}.`);
});
}```
i want it so when i do .reminder it says "you have to say .reminder <time> <message>"
how would i do that
@earnest phoenix you can assign properties to almost anything, including functions
with ".reminder" and ".reminder 1m"
Check how many arguments were supplied
if args.length < 2 then send error message I'd think in your case.
Also using setTimeout for reminders is not a good idea.
If your bot/process shuts down, it won't remind the user.
guys how do I make a number of how many commands each field has?
or is it impossible?
not even excist?
depends on how you make your embed
Uh
sorry, i'm on phone. can't help
@compact oriole how do I react to a embed then it deletes
My bot gon get verified in a week or so, and im paranoid that its gonna go offline
there is a way to join the bot in a specific voice channel ?
yes
How?
channel.join()
and the channel you can get from the cache
with a name or an id, or whatever
client.channels.cache.get(id)
thx
@earnest phoenix you can assign properties to almost anything, including functions
@quartz kindle just realised all objects inherit all prototype properties from Object and functions are instances of Function which is an instance of Object so you can still do object stuff to functions
why "results" is always []:
const googleIt = require('google-it');
let results = (await googleIt({query: 'youtube'}))
return results
?
@earnest phoenix because you're putting the stuff inside parenthesis

remove the unnecessary parentheais
thats not the problem
@earnest phoenix because you're putting the stuff inside parenthesis
no
it doesn't affect it
smh


Maybe it returns a promise?
no he awaits it
@earnest phoenix https://github.com/PatNeedham/google-it/issues/54
thanks
google can easily ban you from scraping it
so you're better off scraping ddg/using some package that does it for you
why u skidding code of github
because if u wrote that code you would see the error straight away
in the error it legit says what you havent done
@earnest phoenix türk müsün kanka
Whoops
Didn't know Discord would notify you tho, that's cool
@earnest phoenix türk müsün kanka
@earnest phoenix evet
@earnest phoenix hata nerede tam olarak
Whoops
Didn't know Discord would notify you tho, that's cool
@opaque seal that is cool. never knew they did that
client yok
şunu dene client = discord.client()
const client = new Discord.Client()
BÖYLE
yapsam
düzelir mi
oda olur ( python kullanıyorum ben)
hm
oldu mu
deneyeyim mi
dene
aynı hatayı verdi
@earnest phoenix
const u kaldır bilmiyorum javascript i çok anlamıyorum
python ile nasıl yazabiliyorsun ki
discord sadece java desteklemiyor mu
@earnest phoenix did you write the code
python ile nasıl yazabiliyorsun ki
@earnest phoenix discord.py var
@royal portal which code
discord sadece java desteklemiyor mu
@earnest phoenix ve hayır kullandığın kütüphane javascript java değil
javascript işte
there's an easy fix
you gotta define client
you forgot to define it so thats the issue
dude i did this but still error
client' of undefined
this error
@royal portal
@royal portal dude i will go dinner i will soon back 15m
someone told me you got that code from github
why dont you check the description on how to start it up
this check... i swear is going to kill me..
what check
else balance = balance
Lol
@sonic lodge ```py
def not_allowed(ctx):
return ctx.author.id in bot.blacklisted_users
@commands.check(not_allowed)```
why, is it not working
nope,
trying to get it to not run commands if they're in the Blacklist, but it either runs it or raises "check failed"
@earnest phoenix gelince beni pingle yardımcı olmaya çalışırım
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno -4058
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t ssh://git@github.com/discordjs/Commando.git
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
npm ERR! enoent Thi``` I can't download discord.js-commando. Anyone know why?
Does anyone have a guide that can help me use Giphy API in discord.py?
i used their example code and it doesnt even seem that the library works.
@real helm nekos.life?
download git @livid lichen
Alright
@real helm nekos.life?
@earnest phoenix Oh, thanks bby
np...?
lol
@earnest phoenix geldim
@earnest phoenix events klasörü varmı?
var
Komutları çalıştırabilmek için yani...
var
sadece bu komut hata veriyor diğer komutlar
normal çalışıyor
bu komut sadece kullanıldığında hata veriyor
yani açıkçası bot açılıyor
komut yüzünden kapanmazlık yapmıyor
english only in this channel
new Date() yap orayı (footer)
@earnest phoenix is that rule ?
i dont think so dude
yes
english only in this channel
@earnest phoenix I can't see any EngLiH oNlY IN This chAnnEl tExT
.setFooter(new Date()
this is development.._.
so?
:D?
@earnest phoenix come dm
do you understand what excluding means lol
No i don't "lol"
interpret it as except
meaning english only in all channels but the mentioned ones
Hi

need help with programming?
const { ShardingManager } = require('discord.js');
const { toUnicode } = require('punycode');
const shard = new ShardingManager('./bot.js', {autoSpawn: true});
console.log('Ready!')
shard.spawn(2);
});```
Is this enough for the bot to work with shard?
Why not?
I just want to know if this would work
Does making a bot in multiple files change anything in bot performance or is it just purely aesthetic ?
purely aesthetic
Ah
based on your code the performance will vary
your computer sees it differently than you
make it perfect and you'll have unnoticable performance drops
but i wouldn't recommend storing anything other than commands in different files
because why the fuck would you want to store half your bot in one file and half in another
however storing all commands in one big file is SUPER TERRIBLE
I just watched a few tutorials and one guy was making everything in the index.js file and the other one was making a seperate file for every command so I was just wondering
a single file will load faster than multiple files
but once all files are loaded, the performance is the same
^
so basically like a one time performance payment everytime you restart your bot
@earnest phoenix that does not seem correct
what is wrong?
you're watching youtube tutorials
youtube tutorials are 10000% outdated
me?
@earnest phoenix yeah thats not how you use the sharding manager
you need to create a separate file for the sharding manager code
not put it in a ready event
oh
I think I understand
thank you
I think I understand
@earnest phoenix you don't know that you understand? get help i suppose
I believe I already know how to do it. I will read the documentation and see how it works for sure
does anybody have manage server in like a lot of guilds?
does anybody have manage server in like a lot of guilds?
@obtuse jolt suspicious
^^^^
you are sus
idkkkkkkkkkkkkk
does anybody have manage server in like a lot of guilds?
@obtuse jolt why the sus question

this isn't among us are you or not
you are sus
@obtuse jolt yes i am tell me something new
also we're getting oof topic
Yo
I have an error, but why
what error
const client = require('nekos.life');
const neko = new client();
module.exports = {
name: "hentai",
category: "commands",
description: "Отправляет рандомный хентай",
usage: "[hentai]",
execute: async (client, message, args) => {
var errMessage = "Это не NSFW канал";
if (!message.channel.nsfw) {
message.react('💢');
return message.reply(errMessage)
.then(msg => {
msg.delete({ timeout: 3000 })
})
}
async function work() {
let owo = (await neko.nsfw.hentai());
const hentai = new Discord.MessageEmbed()
.setTitle("Дрочибельный хентай")
.setImage(owo.url)
.setColor(`#FF0000`)
.setURL(owo.url);
message.channel.send(hentai);
}
work();
}
};```
@silent cloud don't even mention nsfw inside the server
well if you are, go to https://panel.virustotalbot.com/index.php and tell me if you can see all the guilds that you have manage guild in pls
go somewhere like plexidev if you still need help with NSFW
they allow NSFW in some channels
*just found out they don't allow NSFW
Oh
because
i can't find any programming servers that allow NSFW
we don't
so if you're gonna still use nekos.life and ask for help with it find a server that allows NSFW
@earnest phoenix so they we're all there?
yh
awesome
Hey guys, I have a quick question about the bot reviewal process.
Your bot is tested using permissions=0, you should ensure that your bot functions without permissions.
Does this just mean that in order to pass, the bot needs to have some output if it's missing proper permissions?
It's good practice to have output when something goes wrong.
Are the first 8 digits of a (message id) always supposed to be unique? or not
you can ask for embed links permission on help command
but you can't ask for admin for ban command because you only need ban members for it
Gotcha, just making sure I understood what that meant. For a second I read that as "the bot should function properly with permissions=0, and that didn't quite make sense lol.
Right, that all sounds familiar and makes sense, thanks!
@plucky harness well all user ids are supposed to be completely unique and dont just go up 1 number for each user so there is no like neighbour ids as such a bit like youtube where the IDs are completely randomised
because if they went up in order youd just be able to see unlisted videos just by changing like the last letter
wtf bro?
yeah going up by ones is no good
@plucky harness well all user ids are supposed to be completely unique and dont just go up 1 number for each user so there is no like neighbour ids as such a bit like youtube where the IDs are completely randomised
@obtuse jolt not user ids i mean (message ids)
yeah i know
Are the first 8 digits of a (message id) always supposed to be unique? or not
this
caralhes q quem n bate palmas e tripeiro
yes they are mostly unique although with anything unique theres always a chance for one to be the same
mano siga siga]
api_response = api_instance.gifs_random_get(api_key, tag=tag, rating=rating, fmt=fmt)
{'data': {'fixed_height_downsampled_height': '200',
'fixed_height_downsampled_url': 'https://media0.giphy.com/media/LFmxDLUTQH7dS/200_d.gif',
'fixed_height_downsampled_width': '318',
'fixed_height_small_height': '100',
'fixed_height_small_still_url': 'https://media0.giphy.com/media/LFmxDLUTQH7dS/100_s.gif',
'fixed_height_small_url': 'https://media0.giphy.com/media/LFmxDLUTQH7dS/100.gif',
'fixed_height_small_width': '159',
'fixed_width_downsampled_height': '126',
'fixed_width_downsampled_url': 'https://media0.giphy.com/media/LFmxDLUTQH7dS/200w_d.gif',
'fixed_width_downsampled_width': '200',
'fixed_width_small_height': '63',
'fixed_width_small_still_url': 'https://media0.giphy.com/media/LFmxDLUTQH7dS/100w_s.gif',
'fixed_width_small_url': 'https://media0.giphy.com/media/LFmxDLUTQH7dS/100w.gif',
'fixed_width_small_width': '100',
'id': 'LFmxDLUTQH7dS',
'image_frames': '14',
'image_height': '314',
'image_mp4_url': 'https://media0.giphy.com/media/LFmxDLUTQH7dS/giphy.mp4',
'image_original_url': 'https://media0.giphy.com/media/LFmxDLUTQH7dS/giphy.gif',
'image_url': 'https://media0.giphy.com/media/LFmxDLUTQH7dS/giphy.gif',
'image_width': '500',
'type': 'gif',
'url': 'https://giphy.com/gifs/cat-random-nerd-LFmxDLUTQH7dS'},
'meta': {'msg': 'OK',
'response_id': '777181cac0e9912dc8ed16be9cfec6c5bf22df5f',
'status': 200}}
This is what it prints.. so why doesnt print(api_response['data']['url']) do anything.... im so ^&%^&%^& confused
Hi can i get some help with my development?
details?
Its a bot log that keeps a eye on who uses what command or if they use a troll command using my bot prefix"!d". So I can monitor it better but every time I try It shuts the bot off so I wiped the script and planning to restart with help.
can you use punctuation please
can you use punctuation please
Is that better now?
Make a bot logs to see who uses what command using the bots prefix "!d" for example if they uses a command that not there with the bot preifx, I can see that. It to help me monitor if someone trolling the bot so I can blacklist them.
For example:
!d shutit (Troll)
@fleet hornet can you space that out better, don't be afraid of whitespace
@knotty quartz just add a console.log under your command caller
ok
@knotty quartz just add a console.log under your command caller
I only have a database.
Host or bot script? I have two sites I use.
do you know how to code
Yes I have a whole bot list wait a min
then you should know what library you're using
what have i come back too--
But I use two sites .-.
@knotty quartz What library do you use..... What language is your bot in?
@knotty quartz What library do you use..... What language is your bot in?
discord.js
alright that's just invalid syntax
on line 18 of your pastebin
should be this:
new MessageEmbed({ author: `Tritan Bot`, `https://cdn.discordapp.com/attachments/732766998345285712/744305778399117476/8bd897f7fce9469a670f494768f21dec.jpg`,
it's the same embed as normal discord.js
good luck 👍
Do you use glitch?
gitlab oh you mean github
I hate glitch to ir rubbish
Okay ehh
Oh github I use so I cant help there
def not_allowed(ctx):
return ctx.author.id in bot.blacklisted_users
@commands.check(not_allowed)
THIS CHECK IS PISSING ME OFF.
Your trying to make a blacklist?
mhm
Oh sorry I cant help there I use discord.js I find it easier than phthon
meh personally i find python more comfortable for my needs
Lynx just so you know, you can apply a check to every command in Discord.py without using the decorators on every one
i know, but the check itself doesn't work,
it still runs the command, thats not what i want, i don't want the command to executable by those in the blacklist
I think it's not working because you haven't inverted it yet.
If the check returns True, it passes. If it returns False, it throws a command error (check).
So, try using not in.
hello
hi
helloo
muterole1 = await message.guild.roles.create({
data: {
name: "Muted",
color: "#000000",
permissions: []
}
});
message.guild.channels.cache.forEach(async (channel, id) => {
await channel.overwritePermissions(muterole1, {
data: {
id: muterole1.id,
deny: ['SEND_MESSAGES'],
}
})
message.channel.send(channel)
})
await message.channel.send('Muted rang sikeresen létrehozva.')
} catch (err) {
console.log(err.stack);
message.channel.send('Hiba merült fel. Kérlek szólj fejlesztőnek.')
}
return;
}
Error code:
(node:9288) UnhandledPromiseRejectionWarning: TypeError [INVALID_TYPE]: Supplied overwrites is not an Array or Collection of Permission Overwrites.
Who can help me?
please..
i dont know what is the problemxd
@sudden geyser when i use not in it throws this error :
Ignoring exception in command ping:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 892, in invoke
await ctx.command.invoke(ctx)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/discord/ext/commands/core.py", line 790, in invoke
await self.prepare(ctx)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/discord/ext/commands/core.py", line 744, in prepare
raise CheckFailure('The check functions for command {0.qualified_name} failed.'.format(self))
discord.ext.commands.errors.CheckFailure: The check functions for command ping failed.```
Was the user blacklisted
yep
Then it worked
i love you so much..
the amount of times i've put not in then thought to myself That cant be right...
@spice furnace the first argument of .overWritePermissions is an array or collection of permission overwrites. However, your code works for .updateOverwrite
Yeah np lynx
Just make sure you handle the error with the on_command_error decorator.
So instead of throwing that error in your console, you can instead respond with nothing or say the user is blacklisted.
where do you apply for bot dev role?
how do i make the bot make a new text channel
in
which
library
discord.js
l i b r a r y
discord.js
@boreal iron
It's intentional right now because users cannot set a watching status, so you shouldn't receive one from anyone.
@quartz kindle Aye, edited the BOT real quick and surprise surprise, type 3 is "watching" (as it isn't a surprise for you lel)
A good coding app?
Code Lang: discord.js
anyone fancy helping me with my bot. (I have little to no experience lmao) i will be very surprised if anyone says yes
how can I store the amount of messages sent in a guild each month
like what would be a good way of storing that data
have a database and have a message counter for each guild in the database
on every message, increase the counter by 1
if you're worried about performance, update it in chunks with a interval
hitting up your database on every message isn't such a smart idea though, this ^
anyone fancy helping me with my bot. (I have little to no experience lmao) i will be very surprised if anyone says yes
@long widget ping me if you will please
prefixRegex is not defined
else if (command === 'prefix') {
const sql = require("sqlite");
if (!message.member.hasPermission("MANAGE_GUILD")) return message.channel.send("You are missing MANAGE_GUILD permission");
const newprefix = args[0]
const newprefixfix = newprefix.replace(/[^\x00-\x7F]/g, "");
if (newprefix.length < 1) return message.channel.send("Didn't provide a new prefix to set")
if (newprefixfix.length < 1) return message.channel.send("Prefix can't have ascii characters")
if (newprefix.length > 7) return message.channel.send("prefix can't be longer then 7 characters")
sql.get(`SELECT * FROM scores WHERE guildId ="${message.guild.id}"`).then(row => {
sql.run(`UPDATE scores SET prefix = "${newprefixfix}", casenumber = ${row.casenumber + 1} WHERE guildId = ${message.guild.id}`);
message.channel.send("I have set the new guild prefix to " + newprefix)
let modlog = message.guild.channels.find(channel => channel.name == row.logschannel);
const embed = new Discord.RichEmbed()
.setColor(0x00A2E8)
.setTitle("Case #" + row.casenumber + " | Action: Prefix Change")
.addField("Moderator", message.author.tag + " (ID: " + message.author.id + ")")
.addField("New prefix", newprefixfix, true)
.setFooter("Time used: " + message.createdAt.toDateString())
if (!modlog) return;
if (row.logsenabled === "disabled") return;
return client.channels.get(modlog.id).send({embed});
})
}```
hitting up your database on every message isn't such a smart idea though, this ^
@earnest phoenix well its a bit too late to not do this tbh
well it pings the database everytime someone talks to check for a prefix
yeah that's what i thought so
so caching that wouldnt be a very good idea
hm
it shouldn't be that hard to switch to a caching system
so how do i fix this
define prefixRegex
in whichever way you want
@obtuse jolt caching prefixes is like a must lol
see idk a way to define prefixRegex
just to get this out of that way
i really hope you arent regexing the message to catch your prefix
@peak osprey did you copy that code from somewhere?
regex has to be the worst option you can pick for checking prefixes
so no
i mean
if you worked on it, that means you made it, and if you made it, you also made it require a variable named prefixRegex
also, you're using an outdated version of discord.js and likely following an outdated tutorial
Using discord.py and pm2, how can I restart my bot from a command?
pm2 should automatically reveive the process i think, no?
you should just need to exit it ^^
Does pm2 have a thing where it only revives on errors
so just run a sys.exit() function and then pm2 will revive it?
pm2 always revives
Ah oki
the only way to make pm2 not revive is using pm2 stop
actually i need to turn that into a tag
Cuz on docker you can set it so that it will restart if the program exited from an error
1 sec
idk if pm2 has an option for that
cant you use a terminal or shell to tell pm2 to stop?
Sure but that won't be as graceful
good or bad? https://cdn.yxridev.com/u/SsiNTwM0.png
though a kill switch usually should be good for a restart
unless you fucked the code up it should be almost non existant the occasion where you NEED to kill the bot
like setting up a spam or something that works on startup
Thats me again yo
const bot = new Discord.Client();
const snekfetch = require('snekfetch');
module.exports = {
name: "hentai",
description: "Че дрочишь?",
nsfw: true,
execute: async (client, message, args) => {
const { body } = await snekfetch
.get('https://nekos.life/api/lewd/neko')
/* if (!message.channel.nsfw) return message.channel.send("Не могу отправить NSFW контент в SFW канал.")
*/
const embed = new Discord.MessageEmbed()
.setImage(body.neko)
message.channel.send(embed).catch(console.error);
}
};```
Yeah
u wot
nekos.life is banned here
Why ._.
He literally said
Modlog
maybe it was on the website

@silent cloud
ask a mod
You can do NSFW
im not too well familiarized with the website rules
But not from nekos.life
Ohhhh
Idk more pages
iirc nekos.club is by someone here as a replacement for it
It's down now
oh
the bot legit having a stroke with this many channels
And they deleted their discord account
Very wired
i think they charge backed
i had a nitro token from them
and it was gone
¯_(ツ)_/¯
||idk||
clearly one process isnt keeping up with that
Try discord searching nekos.club
All the mentions of it from them - the account is deleted
yeah i know
yall ever get stuck between 5 or 6 projects switching back and fourth or is it just me and my weird ass?
i usually work on one project at a time
true
@quartz kindle what is your opinion on this https://panel.virustotalbot.com/login.php
Looks great
lmfao
now how can i dynamically spawn a node process with a file target and assign it a name and connect to my ipc master?

that's the "new" responsive design 2020
@placid iron refresh
Yes works now thx
Please enter your last known Discord email address and password... lmao
whats the point of the account/password reset if its all done via oauth @obtuse jolt ?
but-
wat
{"easter_egg": "https://www.youtube.com/watch?v=fC7oUOUEEi4"}
hi
you can do that when you click it...








