#development
1 messages · Page 521 of 1
Did you even read what I said?
yes

🍿
continue groovy
i dont got time now
Life
life
Oof I didn’t realize this was development
@keen drift yeah it's not much
but I'm not a coder
so
¯_(ツ)_/¯
studying psych, not IT
ur a weeb
oh okay
wots the ping for
o
where do i go to create bot commands
in your code
how do i get vote count from dbl?
see api docs
where
k, tnx
can you please first look around
then ask
it's like
a
big button on the website
in the channel topic of #topgg-api
didnt see it before
also #502193464054644737
Can someone help me I dont know what to do. I dont get an error message:
discord.js
Client.on("message", (message) => {
if (message.content.startsWith(prefix + "order")) {
// Easy way to get member object though mentions.
if (!message.member.roles.some(r => ["Owners", "Developers", "Chief Of Training Officer", "COO", "Founders", "CDO"].includes(r.name))) return message.channel.send("Insufficent Permissions");
const args = message.content.slice(prefix.length).trim().split(/ +/g);
const command = args.shift().toLowerCase();
let order = args[0]
let notes = args.slice(1).join(" ")
// Kick
message.channel.send(`You have successfully ordered ${order} with ${notes}. NOTE: All spam orders will be denied.`).then((member) => {
// Successmessage
let orderembed = new Discord.RichEmbed()
.addField('NEW ORDER', `Order from ${message.author}`)
.addField('🗒Order', `${message.author} has ordered ${order}`)
.addField('📝Details', `${message.author} has requested that you ${notes}`)
message.channel('513163875672391695').send({orderembed});
}).catch(() => {
// Failmessage
message.channel.send("FAIL Please contact @bobthemoose#2065 to get this fixed.");
});
}
});```
pls help
message.channel('513163875672391695').send({orderembed}); would not work
I don't use discord.js anymore but I don't think message.channel is a function
also
.send({orderembed}) will have to be .send({ embed: orderembed })
message.channel is definitely not a functiom
@brittle nova I dont use json embed I use richembed
Same thing tho
Yes
nvm i got it
HEALLLLP
how does one generate order values that can be stored and used for claiming?
I aint gonna spoonfeed you, generating strings is simple enough
Just store the characters in an array and randomly select from them
Its not in docs but ok
Wh
Okay
Im sure you can figure it out by yourself
Its not too hard
I believe in you
ok
@empty owl did you figure out how to send to a curtain channel?
here I got this from my master coder friend
Client.channels.get('513163875672391695').send({embed});
Yeah
but why {embed}
Read the error
i readed resolved no work
your long description is 300 characters?
the "detailed description of your bot" field
send screenshot of resolved desc
the one below that
Look
detailed description

now do this
now you read that
YOU ARE NOT DOING IT CORRECTLY
finally i resolved the problem
fine i will wait
Recused I Will Try To Modfy The Bot Desc
Its Have 300 Characters
no look
is it spam not oh look it hits the 300 woo
→ /home/minasan/node_modules/better-sqlite3/build/better_sqlite3.node
→ /home/minasan/node_modules/better-sqlite3/build/Debug/better_sqlite3.node
→ /home/minasan/node_modules/better-sqlite3/build/Release/better_sqlite3.node
→ /home/minasan/node_modules/better-sqlite3/out/Debug/better_sqlite3.node
→ /home/minasan/node_modules/better-sqlite3/Debug/better_sqlite3.node
→ /home/minasan/node_modules/better-sqlite3/out/Release/better_sqlite3.node
→ /home/minasan/node_modules/better-sqlite3/Release/better_sqlite3.node
→ /home/minasan/node_modules/better-sqlite3/build/default/better_sqlite3.node
→ /home/minasan/node_modules/better-sqlite3/compiled/8.10.0/linux/x64/better_sqlite3.node
at bindings (/home/minasan/node_modules/bindings/bindings.js:93:9)
at Object.<anonymous> (/home/minasan/node_modules/better-sqlite3/lib/database.js:4:40)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/home/minasan/node_modules/better-sqlite3/index.js:2:18)```
Anyone knows a fix for this?
no
it cant locate the file
Hm ok
download it first
You're going to get denied for random words
no is beacuse is brazilian...
spaces are not counted
write information about your commands
escreva informações sobre os seus comandos
huh?
o
?????
read the doc
I made a cluster idk now
noice
mongoose also works
ok
@keen drift nope, i speak portuguese
o noice
Mongorito is the best node.js ODM, if youre wondering
Schemaless, an api that is stupid simple
Anyone know any bot hosting
Does anyone know how to use weed.moe File and Image hosting?
@earnest phoenix, I seen you use weed.moe, how do I use it?
Sorry about the ping
i have no idea how i did it, but i made an account on the website itself and made an account. since i use sharex there was a popup or something that made a config for me that posts to weed.moe
I dont recall what i did honestly
Oh okay
bot hosting is a vps so yeah
i dont recommend glitch, but if you are just trying to learn how to code then ig you can use it
but if you have money to use
use an actaul vps
like do or something
I use glitch atm till I need to switch
i heard galaxygates is good
GalaxyGate is amazing
only using do since i have student pack
cheap isnt bad
it isnt
each to their own
how do you know
because I use them
mhm
using a product does not mean you know everything about the company
since I know it's owned by someone in discord called Gadget
I even refrain myself from opening the link
yeah their lower end is pretty good
but the price gets pretty high with the the high specs, I think dedis are cheaper to rent by that point
they have dedis
they just aren't displayed on the site yet
new site coming soon
🔜
hopefully it's soon enough
right now I'm using Hetzner CLI to mass deploy nodes
it's handy
hcloud server create --name 'server01' --type 'cx21' --location 'nbg1' --image 'ubuntu-16.04'

I want them to peer with discord
latency isn't even a concern for me
Cloudflare peering = better connection to voice nodes
i just want good price
right now for 40 euros I'm getting 64gb ECC ddr3 ram, Intel Xeon E5-1650V2, 120 GB SSD, 2x2TB Enterprise HDD, and 1 Gigabit NIC
At this rate, I can deploy cheap nodes with k8s
yeah it's out of my budget range
Hey JS folks, is there a good sequelize tutorial that u guys know of... the official docs uses all this lingo that I don't understand :P
I'm only used to sqlite, but I'm switching to heroku, and by extension, heroku's postgres service.
lingo
uh
https://discordjs.guide/#/ ain't bad
A guide made by the community of discord.js for its users.
And is the code all the same regardless of what storage method you're using?
fundamentally yes
Like, it'd be great if I could learn sequelize using sqlite as the database, then change it to my pg database
ok
there's also enmap, never used it, but I think many people do
yeah tried it before
It's just like a javascript Map() but it stores the contents in a sqlite file
But it doesn't work with heroku cuz yk, sqlite
most part of the guide is the same, but you'll have to do different when it comes to the storage i suppose
ok
I was splitting my dashboard and bot into 2 processes and communicating with ipc but node stringifies the messages so I don't get the intended response. Any alternatives to doing this (splitting processes and ipc)?
WHAT
lmao
Would it still store contents in memory?
I still think I should learn Sequelize tho, since it has relations n what not
can anyone who has a dashboard and uses nodejs tell me how they communicate with the bot and dashboard? 👀
you could run both as the same program
I'm personally gonna use a websocket since im gonna send music data every second
@bright spear even if you're planning on making it large?
oh yeah sharding might become an issue
I wouldnt run them as the same
if u use external sharding
yeah it might not be the best option but it works
@brittle nova whats your use case?
anything that couldn't be resolved by just making both use the same db?
hmm
I might continue using ipc
and use the same db
and use ipc only for the small things
since db is the main thing
using mongo
<MongoClient>.connect on the main and child process?
the thing is though
bot.commands gets turned into [] due to node stringifying messages with ipc
so I'm looking for an alternative to that
anyone got any for different processes?
what sort of api?
How would I go about inputting this data into sequelize?
client.q_censored = (mem) => {
let guild = mem.guild
try {
JSON.parse(fs.readFileSync('./data/server_data/' + guild.id + '.json'))
} catch (e) {
console.log(guild.id)
fs.writeFile('./data/server_data/' + guild.id + '.json', '{"censor":"1","role":"none","log":"none","filter":[]}')
return;
}
let serverdat = JSON.parse(fs.readFileSync('./data/server_data/' + guild.id + '.json'))
if(!serverdat) {
fs.writeFile('./data/server_data/' + guild.id + '.json', '{"censor":"1","role":"none","log":"none","filter":[]}')
serverdat = '{"censor":"1","role":"none","log":"none","filter":[]}'
}
let serverdata = JSON.parse(fs.readFileSync('./data/server_data/' + guild.id + '.json'))
let c = true
if(serverdata['censor'] === 0) c = false
let roleobject = guild.roles.get(serverdata['role'])
if(roleobject) {
if(mem.roles.has(serverdata['role'])) c = false
}
return c;
}```
I use this to test if a server has a specific setting and it works perfectly, I just recently added the try{}catch{} in and it works great because sometimes for whatever reason the server doesn't already have a file. So when they send a message without the file it'll make one. And it works perfectly AFTER that, is there a way I could maybe like rerun the function if that error happens? Because I still want it to work on that one time it has to make the file?
I find it easier sh
say that when your data corrupts
I take backups every hour so
And what's to say that an actual database can't corrupt either?
It's besides the point
Can someone help me though plz...
https://discordapp.com/channels/264445053596991498/272764566411149314/513571178359685141
oh nvm
Lol, at first I thought NoSQL was a "meme", kinda like Common Sense Anti-virus...

whats this mean?
7|kyri | { Error [ERR_TLS_CERT_ALTNAME_INVALID]: Hostname/IP does not match certificate's altnames: Host: discordapp.com. is not in the cert's altnames: DNS:*.domain.com, DNS:domain.com
that's interesting, first time seeing that
yes
My footer is weird on all pages of my site
https://amidiscord.me/
It worked fine before, but now it's just so messed up and I have no clue what the cause is
I wanna have the footer be like https://amidiscord.me/commands/moderation but the copyright is centered
I tried to find the cause but I couldn't find it
Thing is, I didn't change anything except two rules
the page length(how long u hv to scroll) is differnt
That's the weird part
prob is the reason bc it works on second.css and third.css but not first.css
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host
uh is that suppose to mean anything
got that off my pyshell
How do you make your bot create a channel
read the librarys docs
I couldn't find it there
What is your lib
if(!premiums.includes(message.author.id)) return;
(node:9943) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'includes' of undefined
premiums is undefined
🤔
whats the meta for this embed color in html
theme-color
so like <meta property="og:theme-color" content="the color hex"> ?
How would I make timeouts for commands/user?
Is a “model” in Sequelize the same thing as a table?
`Slots!
undefined | undefined | undefined
undefined
Good!
- 10 :sand:`
- why does it say undefined?
- how can i make it change your coins? (enmap)
discord.js
(1 has been fixed)
guys
who knows how i can make a text a clickable link
so "here" would take me to discord.com
who knows how i can make my bot do that
on python
For discord.py, it's text in embeds
oh
in embed alright
ill try
does it work in speech marks or without @slender thistle
👌
enmap is js
yeah, but i need a better point system
use a database
why
@sick cloud rethink or rethinkdb
wdym
which package?
Use Sequelize... I was on a similar situation as you (I had worked with SQLite earlier, which is what Enmap uses), and I'd learned Sequelize. Worth the time.
Check it out here: https://discordjs.guide/#/sequelize/ @wide ruin
A guide made by the community of discord.js for its users.
not a db
And as for finding a database, just use Heroku's free Postgres service. If you don't want to use Heroku for hosting though, create an empty app, add the postgres addon, and just put the app in maintainance mode.
it sucks anyways
What sucks, sequelize, heroku, or postgres?
eh I feel like sequelize is fine
There's nothing stylistically wrong with having import statements in your node app instead of require statements?
can someone help me with error handeling
so
elif isinstance(error, commands.CommandNotFound):
return await ctx.send('Command does not exist.')
doesnt work
Returning unknown command messages is bad practice, dont do it, just pass it
i cant find anything on this in docs
can someone send me a link
could someone just dm me a bunch of error handling code for most common errors ❤
commands.CommandNotFound is correct
but it doesnt work
well i dont rlly need that but how do i do no perms
user has no perms
and bot has no perms
You are using the built-in checks, right?
@client.event
async def on_command_error(error, ctx):
if this is what you mean
yes
I mean, in commands
@client.event
async def on_command_error(error, ctx):
if isinstance(error, commands.BadArgument):
await client.send_message(ctx.message.channel, "I could not find that member. Please try again.")
if isinstance(error, commands.MissingRequiredArgument):
await client.send_message(ctx.message.channel, "**Missing Required Argument**")
if isinstance(error, commands.InvalidArgument):
await client.send_message(ctx.message.channel, "**An error occured, Please contact @Hamza#5938 for support**")
if isinstance(error, commands.CommandNotFound):
await client.send_message(ctx.message.channel, "**Command not found**")
else:
await client.say("**Error, Please report this error to @Hamza#5938")
this is my code
Your commands
Uhh
cos i can just do the if and else for user no perms
say only works in commands
yes
@client.event
async def on_command_error(error, ctx):
if isinstance(error, commands.BadArgument):
await client.send_message(ctx.message.channel, "I could not find that member. Please try again.")
if isinstance(error, commands.MissingRequiredArgument):
await client.send_message(ctx.message.channel, "**Missing Required Argument**")
if isinstance(error, commands.InvalidArgument):
await client.send_message(ctx.message.channel, "**An error occured, Please contact @Hamza#5938 for support**")
if isinstance(error, commands.CommandNotFound):
await client.send_message(ctx.message.channel, "**Command not found**")
else:
await client.send_message(ctx.message.channel, "**Error, Please report this error to @Hamza#5938")
Can you do print(discord.__version__) in your on_ready event
0.16.12
Aight
In your commands, what do you use for permissions checks
The @bot.has_permissions(...) stuff?
i use If
if ctx.message.author.server_permissions.manage_messages:
thats not what i meant
i wanna make it say something if the bot doesnt have permissions
Well, that's not going to be compatible with your global error handler
Remove the ifs and use decorators
Actually, does async have those...
Aight, use those then
The exceptions being raised will be commands.BotMissingPermissions for bot perms and commands.MissingPermissions for user ones
👌
i will uploaded now i need to wait
@slender thistle
if isinstance(error, commands.BotMissingPermissions):
AttributeError: module 'discord.ext.commands' has no attribute 'BotMissingPermissions'
Apparently async branch doesn't have that stuff
Simple Error Handling ext.commands - for the async branch of discord.py. Backport of https://gist.github.com/EvieePy/7822af90858ef65012ea500bcecf1612 - async_error_handler.py
Yeah
ffs
You'll have to use ifs in commands
i just changed all my things 🤦
Ctrl + Z all the way ftw
okay so now how do i do it
ifs in your commands
yeah
Or probably a custom check with custom exceptions 
alrdy done the ifs
so how do i check if the bot has perms
and make it say No Perms or something
For example, if the bot doesn't have permissions to kick members, you would add an if ctx.message.server.me.server_permissions.kick_members:
Nope, under every command
use the eris
@client.command(pass_context=True)
async def purge(ctx, amount=101):
if ctx.message.author.server_permissions.manage_messages:
channel = ctx.message.channel
messages = []
async for message in client.logs_from(channel, limit=int(amount) + 1):
messages.append(message)
await client.delete_messages(messages)
await client.say('Messages deleted.')
else:
embed=discord.Embed(title="Permission Denied.", description="You don't have permission to use this command.", color = discord.Color.gold())
await client.say(embed=embed)
If they want to use discord.py, why not just let them use it
so where do i add it
Your purge command checks are fine
"use the eris"
whitename 
whats eris
discord lib
Oh wait, a try-except maybe because delete_messages raises discord.Forbidden
aka
idk what you mean by that(im kinda new at this)
try:
await client.delete_messages(messages)
except discord.Forbidden:
await client.say("I NEEED PERMS")
(Kinda spoonfeed but w/e)
lemme try
client.once("ready", async () => {
await client.user.setActivity(`@${client.user.username} help`);
console.log(`Logged in as ${client.user.tag}!`);
});``````bash
Logged in as Wave#3050!
(node:23234) UnhandledPromiseRejectionWarning: DiscordAPIError: Invalid Form Body
user_id: Value "TOKEN" is not snowflake.```
what u using to code
@client.command(pass_context=True)
async def purge(ctx, amount=101):
if ctx.message.author.server_permissions.manage_messages:
channel = ctx.message.channel
messages = []
async for message in client.logs_from(channel, limit=int(amount) + 1):
messages.append(message)
try:
await client.delete_messages(messages)
await client.say('Messages deleted.')
except discord.Forbidden:
await client.say("I NEEED PERMS")
else:
embed=discord.Embed(title="Permission Denied.", description="You don't have permission to use this command.", color = discord.Color.gold())
await client.say(embed=embed)
not working
Seems like your token is invalid
@slender thistle
not working best error stack
Same
throw new Exception("This thingy broke plz contact dev");
@client.command(pass_context=True)
async def purge(ctx, amount=101):
if ctx.message.author.server_permissions.manage_messages:
channel = ctx.message.channel
messages = []
try:
await client.delete_messages(messages)
await client.say('Messages deleted.')
except discord.Forbidden:
await client.say("I NEEED PERMS")
still not working
and it doesnt give a error
No, wait
I didn't say remove the async for thing
Just put it on the same column as async for
what program u using @earnest phoenix
k
python
okay
it works
thanks 😃
rep @slender thistle
lol
- you are not the first, nor the thousandth to say that
- this is getting off-topic
I do not recommend recommending someone to abuse bots, especially to a whitename
they are too predictable to be more abusive
Check pins in this channel, might help
unmetered just means no limit on usage
Your choice, I use ovh anyways
um
You can get started on digital ocean with like 100 dollars free credit so
you use the 4.49$ a month for ovh?
nah something like 8 or something
o
Euro that is
https://webdock.io is good too
@slender thistle
i have a error
Which is?
What is your code?
It seems like you ban them then check if they have perms
it does it for all the commands
@client.command(pass_context = True)
async def ban(ctx, member: discord.Member):
if ctx.message.author.server_permissions.ban_members or ctx.message.author.id == '494565029841207327':
role = discord.utils.get(member.server.roles, name='Banned')
try:
await client.add_roles(member, role)
embed=discord.Embed(title="User Banned!", description="**{0}** was banned by **{1}**!".format(member, ctx.message.author), color = discord.Color.gold())
await client.say(embed=embed)
except discord.Forbidden:
embed=discord.Embed(title="No Perms....", description="Please make sure i have the permissions required to run this command.", color = discord.Color.gold())
await client.say(embed=embed)
else:
embed=discord.Embed(title="Permission Denied.", description="You don't have permission to use this command.", color = discord.Color.gold())
await client.say(embed=embed)
oh
ik
cos the if and try are in same line
i think
ty anyways 😃
Just move the try-except things
Depending on what you want it to do
so ppl can suggest things for me to look at
DM you or post in another channel?
dm me
is spoonfeeding like not allowed or what
why is everyone like "STOP SPOON FEEDING"
Yeah
on this server too?
Yep
what if you dm me and help
Well, I can suggest you what to do but I won't post a ready code :p
All you need for a suggestion command is to take in all the arguments and send it into a channel
Aight, so:
- I suggest you to do
async def suggest(ctx, *, suggestion):,*meaning "consume the rest" aka all things after!suggest(assuming your prefix is!) will be stored insuggestion - Use
discord.utils.getto get your profile - Send
suggestionto yourself
A bit detailed 
how do i define myself?
doesnt that mean i have to be in the server
You can iterate through client.users
so
owner = member = discord.utils.get(client.users.members, name='Hamza#5938')
or
owner = member = discord.utils.get(client.users, name='Hamza#5938')
i mean member = discord.utils.get(client.users.members, name='Hamza#5938')
how
oh
would that work?
Nooooooooooo
Remove the .members
You got me wrong, mate
client.users is a list of User objects
and they are doing .members on a list
Which doesn't make sense
Nope, wrong
You can't do send_message(id, stuff)
first arg has to be a object 
Well, yeah
@earnest phoenix
Better to check ID instead though
im confused
@slender thistle so
owner = discord.utils.get(client.users, name='Hamza#5938')
You are close
Just check the ID instead with an id argument
No.
members are server members
owner = discord.utils.get(client.user.id, id='1634636236')
client doesn't have that
that?
Almost
client.users tho
owner = discord.utils.get(client.users.id, id='1634636236')
Without .id
owner = discord.utils.get(client.users, id='1634636236')
ik
and you are good
he isnt i dont think
@slender thistle <class 'discord.ext.commands.bot.Bot'>' object has no attribute 'users'
@client.command(pass_context=True)
async def suggest(ctx, *, msg):
author = ctx.message.author
owner = discord.utils.get(client.users, id='494565029841207327')
await client.send_message(owner, "**NEW SUGGESTIONS**\n" + author + msg)
lemme try
still nope
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: TypeError: must be str, not Member
@slender thistle
😦
+ str(author) + '\n' + msg.content
im abit stupid
Command raised an exception: AttributeError: 'str' object has no attribute 'content'
got it
removed the .contect from msg.content
😃
<@&265158261945270273> Accept My Bot Plz
No
yes im waiting 1 hour
Your bot will instantly get declined now
@unreal smelt don't ping that role and don't ask for your bot to be reviewed
ok
Read the faq
@earnest phoenix What is the verification system even supposed to look like
so if someone spams they have to say some random letters
to be unmuted
or they get muted
nope
i dont
or do you know how to do anti spam system
Create a list, append user ID, remove later (await asyncio.sleep), on every message check if the user ID is in that list X times, if yes, punish, else skip
Hello node.js peeps, Sequelize noob here...```js
// ./Assets/sequelize.js
const Sequelize = require("sequelize");
module.exports = new Sequelize("testdb", "hello", "goodbye", {
dialect: "sqlite",
logging: false,
storage: "testdb.sqlite3"
});
// ./Models/tags.js
const Sequelize = require("sequelize");
module.exports = require("../Assets/sequelize").define("tags", {
name: { type: Sequelize.STRING, unique: true },
content: Sequelize.TEXT,
guildID: Sequelize.INTEGER,
userID: Sequelize.INTEGER
});
// ./Commands/tags/add.js
const Tags = require("../../Models/tags");
const tag = await Tags.findOne({ where: { name, guildId: message.guild.id } });
if (tag) return this.client.commands.get("edit").run(message, { name, content });
await Tags.create({
name, content,
guildID: message.guild.id,
userID: message.author.id
});``````bash
SequelizeDatabaseError: SQLITE_ERROR: no such table: tags```
// why would you
help moi
Create a list upon bot start
Upon every message, add user ID into that list
Use asyncio.sleep (refer to Google for better explanation) to delay removing from the list
Now, upon every message, you check if user ID is in that list X times (iterate and custom variable with counting) - if yes, punish, if user is not in the list X times, just skip
@earnest phoenix we're not here to write your bot for you
rave i didnt ask you stop getting involved
don't get rude.
IM NOT ASKING YOU RAVE
no need to go breaking rule 1
Hello Jonny 
Hey there 
@earnest phoenix either learn to code yourself
thats what rave is doing
oh hi Papa John
*coughs* use DBM
OMD JUST STOP GETTING INVOLVED
it says in #rules-and-info that we don't support spoon feeding
calm the fuck down, dude
okay Jonny please
I didnt ask you to spoon feed did i rave?
Rave you called me "John" 
I made a pizza joke
ahh
thank
:)
Uh... could someone help plz... amongst all this my innocent help question got buried in the chat history
https://discordapp.com/channels/264445053596991498/272764566411149314/513754088031256577
better be no more heckin fights when I look back here
lmao
Subscribe: bit.ly/FoggyIO My Discord: https://discord.gg/bjyxUn6 The Code: https://github.com/FoggyIO/DiscordPythonBots/blob/master/Tutorial4.py *Outro Music...
here you go
google next time
:)
oh no
el mao
Seriously, this tutorial is already bad enough
as an absolute novice in coding I can tell that's the best practice
Don't mean to be intrusive but i kinda need help on that question
that's not best practice anyways
@tight heath thats not a anti spam
oh you were the sqlize guy @opaque eagle
Yeah
I'll have a look
Thx
:)
Oh seriously
@earnest phoenix Create list, add all swear words you know, iterate and check if element.lower() is in message.content.lower()
I like sql cuz someone already made a discord.js commando settingsprovider for it lol
true - punish
false - skip
Ew commando
so people dont spam
I strip commando of all its features and custom-build every aspect of it but it's commando at its core
so if someone the same message or sends lots of messages together
lmao what
it locks the chat
just write a command handler
or mutes them
Someone.on("sendsRandomMessages", person => person.mute(eternity));```
@earnest phoenix That is an antispam, though
oh
@client.event
async def on_message(message):
contents = message.content.split(" ") #contents is a list type
for word in contents:
if word.upper() in chat_filter:
if not message.author.id in bypass_list:
try:
await client.delete_message(message)
await client.send_message(message.channel, "**Hey!** You're not allowed to use that word here!")
except discord.errors.NotFound:
return
this isnt
this is whats in the vid
That video sucks.
create a new map called messages (or an array with tuples)
map author to last message
on message
I explained how to do an antispam
but its confusing
and?
What maps are we talking about
Don't do an API call on every message.
That's just bad and slow
and is bad for your ratelimits
still confused
it's really not
im not that good at coding
you map each author
okay?
to their last message
it's not coding
this is logical thinking
so
you map each author to their last message
like
dk how
read the link
I just sent
that's the datatype
it's called a dictionary in python
method to do that is .update
anyone know what that errro means
which one
[tls @ 000001dd0004d9c0] Error in the pull function.
[matroska,webm @ 000001dd0004a8c0] Read error
[tls @ 000001dd0004d9c0] The specified session has been invalidated for some reason.
Last message repeated 1 times
the bot token isnt working
maybe
i was playing music on my bot and it showed that after like 3 mins
maybe your connection to youtube
yeah
i use youtube_dl
ok
should be
Just try again
do you know how to make it so users can config the prefix
@earnest phoenix yes
yeah
have a database to store server config
python is good
golang is good 👌
Slices are arrays in golang
im doing sql in school rn lol
and map[string]string is a map
we have to make some tables in sql rn
has this turned into "x is better" topic now
some databases
mongodb > * ofc
ik golang is bae
UHHHHHHHHH
i been waiting since 10:45 PM to get my bot verified and its been 12 hours and Xiggy said at 11 Will be at your bot in 20-40 mins
and mongodb > * I agree with
@tight heath yes yes
why is spoon feeding not allowed
golang is bae
Bad for learning @earnest phoenix
because it doesnt teach people shit
@earnest phoenix I waited for 2 days so chill lmao
I got denied the first time
same
^ same
for offline
same here
because wiki command
i waited 2 days too
I didn't have permanent hosting before
@earnest phoenix I waited 2-4 days to get my bot approved, so keep calm and patient, it will be better for you
i got denied from this host cos they didnt test it propperly
i got denied first time because my bot "Did nothing"
not the other way round
is it possible to do a changing profile pic?
why did you have that in the first place
idek
someone made his lights turn off with a cmd in discord how nice
thats probs easy
life goals
get smart lights
seems easy
and then its probs easy
most smart lights have sdks
i just cba to do it rn
im tired
In this video I show off some cool features of BlazeBot, a Discord bot written in Python by me, and as a proof of concept manage to turn a light off in my ro...
I still don't know how to get audio data from windows
oh he used a raspberry pi connected to his desklamp
ooof
wdym rave
it's a terminal command he's executing
oh
in node you could do that using sub_process.exec
The other thing idk how to do is detach a process from its parent process
in go
trying to make a docker container type thing
still trying to figure out how to host my bot on my pi
would i use putty to connect it to win10?
you would use putty if you're running the rpi in headless mode
why wont this wokr?!
const Discord = require('discord.js')
const footer = require('../settings/config.json')
exports.run = async(client, message, args) => {
client.on('guildCreate', () => {
async (client, guild) => {
const invite = await guild.channels.find(c => c.type !== "category" && c.position === 0).createInvite({
maxAge: 0
});
let joinEmbed = new Discord.RichEmbed()
.setTitle("Bot joined server!")
.setThumbnail(guild.iconURL)
.addField("Server Name:"+ guild.name)
.addField("Server ID:" + guild.id)
.addField("Server Owner:" + guild.owner)
.setFooter(client.config.botname)
.setTimestamp()
client.channel.get(footer).send(joinEmbed);
}
})
};
idk give us an error
no error
ye
that will error some times
i knw
if the bot doesn't have the perms to create an invite
i know, im going to make it return if it does not have invite perms
what part of it isnt working




