#development
1 messages · Page 417 of 1
isn't there ctx.user?
okay
await self.bot.user.say('Hi')
await self.bot.say('Check DM. :>')
Is okay or
Lmao
=)))))))
ctx, not bot bb
yes show the error, maybe someone will give you a hint
Anyone can give me a command for python bot? To send a DM message?
For example, i type !help and i want a response in dm
And i got this error at ctx
Ignoring exception in command invite
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/discord/ext/commands/core.py", line 50, in wrapped
ret = yield from coro(*args, **kwargs)
File "/root/Potato/cogs/invite.py", line 16, in invite
await ctx.channel.send('Invite me to your server with this link: \n\n<Link>)
AttributeError: 'Context' object has no attribute 'channel'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/discord/ext/commands/bot.py", line 846, in process_commands
yield from command.invoke(ctx)
File "/usr/local/lib/python3.5/dist-packages/discord/ext/commands/core.py", line 374, in invoke
yield from injected(*ctx.args, **ctx.kwargs)
File "/usr/local/lib/python3.5/dist-packages/discord/ext/commands/core.py", line 54, in wrapped
raise CommandInvokeError(e) from e
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'Context' object has no attribute 'channel'
/root/Potato
#readthedocs
There is say and there is a send or something in async forgot what it was but it's something like send(user, message)
send_message()
Ok
Docs? What are those
/s
@solid cliff
Ignoring exception in command invite
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/discord/ext/commands/core.py", line 50, in wrapped
ret = yield from coro(*args, **kwargs)
File "/root/Potato/cogs/invite.py", line 16, in invite
await self.bot.send_message(user, 'Invite me to your server with this link: \n\n<Link>')
NameError: name 'user' is not defined
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/discord/ext/commands/bot.py", line 846, in process_commands
yield from command.invoke(ctx)
File "/usr/local/lib/python3.5/dist-packages/discord/ext/commands/core.py", line 374, in invoke
yield from injected(*ctx.args, **ctx.kwargs)
File "/usr/local/lib/python3.5/dist-packages/discord/ext/commands/core.py", line 54, in wrapped
raise CommandInvokeError(e) from e
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: NameError: name 'user' is not defined
please, use codeblocks
How))
Or hastebin
the button right below your esc button, put tripple of those one both sides
Use code blocks:
```language
code
```
or https://hastebin.com/
to paste your code and errors
Ok
User is not defined
How to define it?
By getting the user
Facepalm
I want to make this command
To do this:
'If anyone type prefix invite'
'Bot DM with a link'
😐
get a user that sent that command and send them the content
then it would be pass_context=True and add a ctx to the def aaand get user object as ctx.message.author
Ok wait
and people say python is easier
depends who says it
Rewrite ez 
rewrite is actually much better
send example code
Rewrite: user.send("xd")
Async: does not auto context and send_message(user, "xd")
👏
show your current code
Ignoring exception in command invite
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/discord/ext/commands/core.py", line 50, in wrapped
ret = yield from coro(*args, **kwargs)
File "/root/Potato/cogs/invite.py", line 16, in invite
await ctx.message.author('Invite me to *your* server with this link: \n\n<Link>')
TypeError: 'Member' object is not callable
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/discord/ext/commands/bot.py", line 846, in process_commands
yield from command.invoke(ctx)
File "/usr/local/lib/python3.5/dist-packages/discord/ext/commands/core.py", line 374, in invoke
yield from injected(*ctx.args, **ctx.kwargs)
File "/usr/local/lib/python3.5/dist-packages/discord/ext/commands/core.py", line 54, in wrapped
raise CommandInvokeError(e) from e
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: TypeError: 'Member' object is not callable
ok that's traceback, now mind showing your python code?
Just the command code
Is a cog
Ok
class invite:
def __init__(self, bot):
self.bot = bot
@commands.command(pass_context=True)
async def invite(self, ctx):
"""Outputs a url you can use to invite me to your server."""
await ctx.message.author('Invite me to *your* server with this link: \n\n<Link>')
await ctx.message.author('Check DM. :>')```
*i ll edit last line to send in channel
ok, you have the member defined, but you forgot the send as well
send_message(user, message) 
wait is that async?
Yus
im out then, idk why I was even trying lol
@commands.command(pass_context=True)
async def invite(self, ctx):
"""Outputs a url you can use to invite me to your server."""
await ctx.send_message(user, 'Invite me to *your* server with this link: \n\n<Link>')
await ctx.send_message(user, 'Check DM. :>')```
Is okay now?
self.bot.send_message
User = ctx.message.author 
is he sending 2 DMs one after another? 👀
@commands.command(pass_context=True)
async def invite(self, ctx):
"""Outputs a url you can use to invite me to your server."""
await self.bot.send_message(user, 'Invite me to *your* server with this link: \n\n<Link>')
await self.bot.say('Check DM. :>')```
Try it
Yus
alright, my turn to get help xd

Yus
before when a message was not found by id it would notify a user about it since I defined that, but now it started spitting 403 errors instead
ik code is shit, but it's not public so who cares lol
@ReKT#0001
File "/root/Potato/cogs/invite.py", line 14, in <module>
user = ctx.message.author
NameError: name 'ctx' is not defined
Unclosed client session```
@solid cliff
Where are you putting it
At start of code
user = ctx.message.author
@commands.command(pass_context=True)
async def invite(self, ctx):
await self.bot.send_message(user, 'Invite me to *your* server with this link: \n\n<Link>')
await self.bot.say('Check DM. :>')```
Put it inside the def
U can rewrite?
What
?
How to put inside the def?
Just cut and paste it in
Ok
async def x(self, ctx):
User = ```
Ok
Dome
Done
File "/root/Potato/cogs/invite.py", line 7, in setup
bot.add_cog(invite(bot))
TypeError: 'Command' object is not callable
Unclosed client session
=))))))))))
Can help?
@solid cliff
Ignoring exception in command invite
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/discord/ext/commands/bot.py", line 846, in process_commands
yield from command.invoke(ctx)
File "/usr/local/lib/python3.5/dist-packages/discord/ext/commands/core.py", line 367, in invoke
yield from self.prepare(ctx)
File "/usr/local/lib/python3.5/dist-packages/discord/ext/commands/core.py", line 345, in prepare
yield from self._parse_arguments(ctx)
File "/usr/local/lib/python3.5/dist-packages/discord/ext/commands/core.py", line 304, in _parse_arguments
transformed = yield from self.transform(ctx, param)
File "/usr/local/lib/python3.5/dist-packages/discord/ext/commands/core.py", line 212, in transform
raise MissingRequiredArgument('{0.name} is a required argument that is missing.'.format(param))
discord.ext.commands.errors.MissingRequiredArgument: ctx is a required argument that is missing.```
codeblock pls
ye
@tardy hatch remember to put pass_context=True
First, MessageEmbed Is only for received embed
if you want to construct and send one, you have to use RichEmbed
People these days 🤔
Well if your on master is MessageEmbed
OwO my console is getting spammed with warnings
WARNING.discord.state:GUILD_MEMBER_UPDATE refernanceing an unknown member id [id]
and its only two ids
spamming my console like every few seconds
ok seems to have stopped
any good Ubuntu mysql clients
the command line
I wanna ask if DBL does the servercount adding of the sharded bots
or we need to add it ourself before posting it
DBL will add for you
thanks
exports.ramUsage = async (client, bot) => {
let memUsage = [];
let ramUsage = await client.shard.broadcastEval('process.pid').then(results => {
results.forEach(pid => {
bot.pidusage(pid, async (err, stats) => {
let memory = Math.round(stats.memory / 1024 / 1024)
console.log(memory)
memUsage.push(memory)
})
})
console.log('ForEach Done')
return memUsageFinal = memUsage.reduce((prev, val) => prev + val, 0)
}).catch(error => {
console.log(error)
});
return ramUsage
}
is there a way for this code to stop until forEach is done? because it keeps on returning zero due to executing the return command even before the foreach is done
i thought forEach was synchronous
we got the problem its the bot.pidusage was causing it
use a for loop and await
How to set owner ID? For only owner commands
what lib @tardy hatch
Python @lament meteor
oh i dont know python but.... here is the concept:
get the message author id
if the message author id is your id run the stuff
Are you using commands.ext?
@tardy hatch just add an if in the command.
if ctx.message.author.id == YOURID:
Do something
Else:
await ctx.send("Owner only")
Ok
else not with a caps
It's easier to just do a check if a user is not the owner, that way you don't have to do the else statement
lol
Like when I use the command nothing appears.
XD
Can anyone help me?
And there is no error that I see.
Which really ticks me off.
Can anyone help me???
does your bot even have permissions?
i have problems with the bot
Yes.
fs.js:675
10:56 AM
return binding.read(fd, buffer, offset, length, position);
10:56 AM
^
10:56 AM
10:56 AM
Error: EIO: i/o error, read
10:56 AM
at Object.fs.readSync (fs.js:675:18)
10:56 AM
at tryReadSync (fs.js:540:20)
10:56 AM
at Object.fs.readFileSync (fs.js:575:19)
10:56 AM
at Object.Module._extensions..js (module.js:662:20)
10:56 AM
at Module.load (module.js:565:32)
10:56 AM
at tryModuleLoad (module.js:505:12)
10:56 AM
at Function.Module._load (module.js:497:3)
10:56 AM
at Module.require (module.js:596:17)
10:56 AM
at require (internal/module.js:11:18)
10:56 AM
at Object.<anonymous> (/app/node_modules/ws/index.js:3:19)
this
My bot has the permissions.
look up
Its an IO error
Most likely related to file IO
Yeah its fileIO
Can you check the file you are trying to read exists
and readable
yes for now
a lot of people do?
yeah i can never get the hang of it
errors everywheree
okay where's the file you're trying to access
I dont understand
:/
@earnest phoenix YOu new to glitch?
I haven't seen anybody use server.js for a bot.
And why?
JUST WHY?
Why are you using views/index.html
and cs
and js
YOu are new aren't you.
sorry glitch is just not my thing mascu :(
I can help.
i use app.js
And delete so many other.
when i try hosting on glitch my code just goes crazy
so im probs not the best person to ask
and it would be better if he had a command handler aswell
Oh he doesn't have a command handler?
Nvm
She needs fs command handler so I can help.
Fixed
Thank you guys
Ok.
You are welcome i guess.
I*
@earnest phoenix :+1:
aye
Good bot btw @jovial sable
Np
it's my first project
Uh
lol
how can we help if we dont know anything just the error
What is the cause of the error .. Error: read ECONNRESET
idk
Either all my bot shards are down or my bot commands are broken.
Can anyone help me find out?
is your bot online
Yes.
most likely your commands then
Wanna see one of my bot scripts?
sure
that’s look fine but no need for exports.require
and is errMsg even an function
Where?
at top
i mean module
just put require
Ok.
module.require -> require('d.js')
what is Array.?
that’s built in
o
also @earnest phoenix he/she is saying if
!ping <something here> say too many args
dont u have to do .setColor('#hex')?
for embed colour yeah
It works either way doesn't it?
also it’s only require not module.require
Oh ok.
So take off module?
yes
Error
wait nvm
gtg
try to change let msg = new Discord.RichEmbed to var msg
and const
Wrong
but const you cant change
So it's not the same
still a variable
It's a constant
true
Not a variable
let and var are not the same thing
I would have expected better from you, novus
var > let
let and var are fundamentally different, one is scoped and the other is not

I would expect you to read what I said and drop the ignorance. "They act the same to me, so they are the same!!" is pretty ignorant.
iirc let sometimes bug code i dont fully remember the difference with var. but i know they are differnt
google difference between let, var, and const u should find why
If I change it what will happen to the embed?
No I know the difference.
I mean the embed.
If I change our let winner to be var winner , they'll come back as true , because it's not inside of a function, it's not scoped to it, whereas a let variable is. The other thing we need to know about it is that the difference between let and const is that const variables cannot be updated
Wait just to double check it should be:
So the code should be like this?
const Discord = require('discord.js')
It has that.
What about it?
Oh that.
I see.
why module.require()
and why
if (!args[1])?
but if (!args[0]) means if u dont have args[0] it will not do anything
Oh so 1?
avoid doing that
What do I do?
if args[0] is a bool
it would return false
So args 1?
you want to do if (args[0] === undefined)
or null
instad of ! check
! check works that same way
not really
if args[0] is false
Ok.
get it?
if you're trying to check if something exists
can u go to my guild for a while Atlas
use the !== undefined
or null
if it’s false how could it be undefined then?
you dont get it
!something = check if false
!== undefined/null = check if exists
the problem with using the first one is that if the users inputs a false boolean (in this situation)
it would return false
if args[0] === false it is the same thing as if !args[0]
yea
what were you trying to check, if it was false?
or if it exists
as in defined
Ok I am my phone now,
Ok I am my phone now,
So it is more buggy.
And hard to code.
And the internet is worse.
anyone know any free NSFW api's?
Lmao
Well my bot still has errors.
I’m try to run it now.
Doesn’t work but doesn’t show any error.
has errors
doesnt show errors
What is the error
- If you are wanna get a member by tagging them, please use
message.mentions.members.first()
instead of
message.guild.member(message.mentions.users.first()) || message.guild.members.get(args[0])
- Also instead of doing something like this
args.join(" ").slice(22);
Use this instead
args.slice(1).join(" ");
That way it slices the first argument, without leaving any empty space.
- And if you are kicking or banning a user, you must use
User.kick(Reason) //or
User.ban(Reason)
instead of
message.guild.member(User).kick(Reason) //or
message.guild.member(User).ban(Reason)
- Additionally, if you want to tag someone with the bot and you have the user object you can just send the user object, like this:
Channel.send(`Hello there ${UserObject}`);
instead of using this
Channel.send(`Hello there <@${UserObject.id}>`);
JavaScript^
Discord.js

no one is gonna pin it if u tell them to
please #memes-and-media
ok
how to upload custom/animated emojis discord.js?
message.react(":EMOJI NAME:EMOJI ID");
how to upload
// Create a new emoji from a url
guild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')
.then(emoji => console.log(`Created new emoji with name ${emoji.name}`))
.catch(console.error);
I love the docs
Can webhooks send custom emotes?
what are the common reasons a discord bot returning 403 code?
lack of permissions
odd...
so here's a thing I'm assuming, it's returning 403 because it can't find the message specified? cause that's what's happening
I give it a non existant message id intentionally and it should say that it didn't find the message, but instead it prints that error
if it can't find the message it'd probably spit out a 404
but it's not
if you're getting a 403 with getmessage you probably don't have READ_MESSAGE_HISTORY
hmm
nope, that's not it
I gave the bot a limit of looking back up to 500 messages per channel to find that message, may that be the cause?
I'm starting to think it's discord's at fault that fucks it up weirdly
highly doubt it
the other weird thing about it is that it worked fine before with a proper way of failing to find that message, and now without changing anything at all it started this crap instead
I haven't touched the code for like 4 days and this started yesterday
so no ideas?
how can i get the number of votes for my bot off the site?
wheres thay
i meant like for my bot to use tho in an embed
use an http request library like snekfetch or something
how do bots get animated emojis? i tried doing <\:loader:448541225860071444> but it just defaults back to loader
ok
<a:name:id>
is that appropriate for this channel
Idk probably not
why does that always comeback as true??
what does client.commands Map store? im sure its not string right? aslong as thats the case, this will always be true
is using .json for a small bot good? because I wanna setup server prefixes for my bot (I'm using python)
Yes it works
you use || so isn't it a bool ?
what 雪音 said
|| doesn't mean its a bool
e.g. const lorem = null || "hello" lorem will be "hello"
mb I though doing this would convert the expression to bool
hmm
it will store the first expression that evaluates as true (a non-empty string, a number > 0, a true bool etc.) or the expression of the last result
but how should I do it ?
do a console.log(cmd) and show us what the map returns
I save client.commands as a "enmap"
"collections"
wtf
so just do if (!cmd) // you are trying to reload a non-existing command
is 🅱edis ok as a persistent db
do you mean redis 
yes
well redis is a key/value database, it can work as a persistent database for some situations with many considerations (like no need of SQL magic, small data storing etc.) with some good configuration and preparation from the beginning but its usually advised against
Quoting: RDB is NOT good if you need to minimize the chance of data loss in case Redis stops working (for example after a power outage).
do you have the <Client>.on("error", error => { ... })
no
what does it do?
handles that error
you didnt close the (
but yes
and you can skip the { part if you're only going to log it
bot.on("error", console.log)
^
how would I get rid of the error?
ye do that and come back
once you get an error send it here and we'll help
ok
thx
now we wait
again
crashed but no error
like completely silent, process crashes?
Yeah
it could be an unhandled promise error being thrown
Imma try to restart it
is it reproducable?
it just randomly crashed
crashes*
nvm
gateway is throwing not authenticated
what does that mean?
you aren't authenticated
are you trying to do something before bot is ready?
no
could you do console.log(error.error) in the error event
so we can see the stacktrace
whats at line 57
id is undefined
oh
umm no
woops
the user is undefined
it was guild not guilds
soz
when should the error get logged?
when I attempt to stop the program to restart it?
if you don't catch it it needs to be logged
that isn't good
no
@earnest phoenix https://dev.twitch.tv/docs/v5/reference/search/#search-channels
soGET https://api.twitch.tv/kraken/search/channels?query=<URL encoded search query>
tho it says v5 is deprecated, have a look over at their api
promis.catch(error) => console.logerror)
```?
I got it from https://dev.twitch.tv/docs/v5/reference/search/
Twitch Developer tools and services to integrate Twitch into your development or create interactive experience on twitch.tv.
promise*
you can always use
how would I find this error though?
.catch(error) => console.error)```
put it on the promise 👀
where would I put the catch?
missing a )
oops
setActivity returns a promise, it could be the one that errors
you execute it a few seconds after your bot is ready so it'd make sense
so how would I get it to wait a few seconds?
just catch promise errors in case it throws one
when dealing with promises you either have to await for them
or catch any potential errors they might throw
if you await on a promise the error will be thrown in the stack
that?
where you do setActivity(...) do it like setActivity(...).catch(console.error)
Ok
https://hastebin.com/nojejepako.css what's dis?
nope, not the setActivity
wait
Juptain
you have modular code
yet
you're using it in a msg event??
hecc?
I can see a problem with your code
I do too
:3
I see a worse one

oh god
bot.on("message", async message =>{
that?
:3
o no
smh
you are doing let seconds = ms(5000) for some reason and that calls upon ms module which converts 5000 ms to 5s (string) then you do setInterval(function() { // set bot activity here }, seconds) which causes the interval to spam as it wants an integer param in ms not a string
which causes bot.user.setActivity to spam and not sure how discord.js handles that
what the hell node
throwing on invalid arguments
parsing all digits from the string until a non digit is found and using that as an argument

https://letters-of-the-alphabet-are.xyz/S51kqwLX.png Can someone help me?
i hate this error tbh
@tall condor the option should be under new when you rightclick the folder at the top
im not seeing anything related to group package :/
@earnest phoenix tried re-installing? is disk almost full by any chance?
how do I send a message to a specific channel ona server=
language?
js
I have to remove everything and put all that back?
@earnest phoenix
threading support for nodejs. interesting
client.channel.get(448559746568421398).send('My Message');
this does not work
@earnest phoenix just try a npm install and npm upgrade make sure you're up2date and see if you get it again
elaborate @earnest phoenix
ahh wait didnt see your message before that
@earnest phoenix your id needs to be a string
@earnest phoenix it's
bot.guilds.get('guildid').channels.get("channe;id").send('hey')
bot.channels work too as long sharding isn't being used
use a string instead of an integer
snowflakes are string
as tom said
uhm I cant find "send"??
?
I'm working on making my first bot and I ran into a problem where I have no src folder like the tutorial has. Heres what im seeing https://cdn.discordapp.com/attachments/264445053596991498/448598399584043018/unknown.png
client.channels.get("448559746568421398").send('My Message')
ew typescript
Why
@earnest phoenix it's better to get the guild instead for just getting the channel
I like my types
I prefer ecmascript 

you can also find the name of a channel
I was just saying that both work @brisk notch
mmk
I want to add a deep-fry command to my bot, but I'm not sure how to do so with ImageMagick
it says It misses permission
How would I pull that off?
nvm
is anyone available to help me?
does anyone have experience with JDA?
client.channels.get(${settings.notifyChannel}).send('My Message')
whay doesnt this work?
@tall condor no but you can join the jda discord for help
like wtf
client.channels.get(settings.notifyChannel).send('My Message')
does not work...
What are the params for client.channels.get()?
What does settings.notifyChannel contain
Where does that come from?
Also are you reading the discord.js docs
?
its a channel i think
i figured but i wanted to know its actual value.
also client.channel.get returns a Channel
there's no send method on Channel
settings.notifyChannel is athe channel name of a specific channel?
so how do I make it send it to a channel ?
that i only kno wthe name on?
if its the name you have to do find("name", settings.notifyChannel) instead of get
get is strictly for collection key and in that case that's the id aka snowflake
like this? client.channel.find("name", settings.notifyChannel).send('My Message')
yes
but channels not channel
thx mate :))
That works? Because channels is a Collection of Channel
it is on the discord.js docs
Doesnt it need to be a TextChannel
Channel is the base class which is extended by DM/Text channel etc
doesn't matter, the retrieved object will be the proper class
Channel is all the channels, whether group, dm, text, etc.
also if you will be using find with name its better to search by guild first @earnest phoenix
otherwise you'll have conflicts
snowflakes are unique, names aren't
Hmm.
although iirc if u use .find() on the channel it finds the type of channel and returns that
correct, it will return the object with its proper class based on its type
which is why you can use .send on it
cools
Ahh yeah i found an instance where i was doing this too.
but im in typescript land, so i had to do a cast
const channelToMessage: TextChannel = this.channels.get(notifyChannel.id) as TextChannel;
In order for this to work
How would I do this Python PIL code with ImageMagick?
con = ImageEnhance.Color(img)
img = con.enhance(10)
EW PYTHON
ew u
What's wrong with Python
also python is gud
personal oppinions...
well you could say that about every language
I want their opinion on python and why they dislike it
Or is it just a case of "I don't understand x technology therefore I dislike it" :^)
nothing more than just a regular behavior of a person liking their own prefered language, thus "insulting" other languages

Here's a link to the related docs for my question: https://pillow.readthedocs.io/en/5.1.x/reference/ImageEnhance.html
I don't tend to work with JavaScript directly anymore heh
can you add a masked link (markdown) in an embed field title?
if your using d.js you can just do something like
link: "oof"
lemme checc my code
or something like that
oh, field title
make it store a prefix if u use something like !setprefix &
then check for the guild prefix in your db
if there is nothing use the one in config
if yes use prefix in db
i want a command like !setprefix ! and it changes the prefix only in that server until they change it again
you need a db
^
well right now im using json but
what DB you use doesn't really matter >.>
what is that. sorry im not the best at coding
database
hell i use a .yml file just because i have the code for it >.>
i just don't know how to code it
what language?
ok then use fs and json
discord.js
also thats not a language >_>
java
script.
mhm
welp i'm useless here >.>
oof
@wanton needle if you dont know how to use databases you cant do custom prefixes
anyways, you'll want some type of database
.json
.yml
.sqlite
Doesn't really matter since you're not storing a large amount of info
o well then
sqlite is pretty good tho
json can corrupt if too much data is being removed/written
I've personally just been using yaml since i have the code for it already 🤷 i don't really store enough information to require me to learn sqlite or mysql xD
yeah, it's definitely preference
i usually don't like big npm packages :p
aka: 2 zillion deps
I'm talking about memory usage over if it's easy
ah
well i think systemd would do better in that, definitely
systemd is written in C, it's the init daemon you know
I recently upgrade to 16.04 and my process are like 25% more memory usage then 14.04
Why is it taking more memory.
could be a billion reasons
on systemd or pm2?
systemd
ic
It was like 30% on ubuntu 14.04
Not sure what could be causing it.
32% mem in 2g looks like a lot for a bot to me
try and find top things that use memory, there's a few modules for that
don't take my word tho haven't dealt with py before
@abstract mango like what?
Was looking for a recommendation before I google. That's why I didn't....
/usr/local/lib/python3.5/dist-packages/discord/activity.py:573: size=472 KiB, count=7548, average=64 B
/usr/local/lib/python3.5/dist-packages/discord/activity.py:137: size=337 KiB, count=1541, average=224 B
/usr/local/lib/python3.5/dist-packages/discord/activity.py:139: size=332 KiB, count=1577, average=215 B
/usr/local/lib/python3.5/dist-packages/discord/activity.py:138: size=245 KiB, count=1122, average=224 B
/usr/local/lib/python3.5/dist-packages/discord/state.py:346: size=150 KiB, count=602, average=256 B
/usr/local/lib/python3.5/dist-packages/discord/activity.py:580: size=146 KiB, count=1099, average=136 B
/usr/local/lib/python3.5/dist-packages/discord/activity.py:367: size=128 KiB, count=587, average=224 B
/usr/local/lib/python3.5/dist-packages/discord/activity.py:572: size=76.9 KiB, count=579, average=136 B
/usr/local/lib/python3.5/dist-packages/discord/activity.py:576: size=41.7 KiB, count=593, average=72 B```
Not what I'm looking for
let's try gumpy
yeah
if you run python 3.6 package you need to install python3.6-dev
No, it's 3.5
which is installed
Guppy is python2
i'll try something tommorow, it's late.
i wanna hide my bot token or a file from github, how do i do that?
(bot lib is python)
add a gitignore
.gitignore needs content in it to hide it
basically
# gitignore file
# example
secret.json
git will not hide if you've already commited it, you need to git rm --cached secret.json
and then probably should reset your token because it will most likely still show up in git's history
???
thegit rm --cached secret.json thing
that’s a command
idk is it
git bash?
thst works i think
hey. for js how would i do cooldown errors? basically a command has a cooldown and if the command is run before the cooldown ends, the bot sends a message with the time remaining on the cooldown.
aren't you using akairo
akairo has a cooldown param in it's command constructor
example pls?
i know, but i want to display an error message if the cmd is run before the cooldown ends
do you have a commandBlocked listener
kk
so what happens here
k nvm
?
thats the event name right?
yes
so i would do eventName: commandCooldown
yes
ok thank
ok im still confused on how to hide files on github, ill provide more information:
lib: python
host: heroku
bot: psychic
question: i wanna hide my bot token, can someone give me an example rather than teaching me
please respond, i know this is annoying but i really need it
.gitignore
i need a tutorial on that
im new to github
(locally hosting bot and wanna host it on heroku)
@earnest phoenix there are a lot of tutorials available on YouTube
And they also explain how to hide private variables
And if heroku doesn't work for you i would also recommend glitch.com
ok
heroku is literally the worst god damn thing ever
sounds good
uhm lol
If I change stuff here it appears in my mod-log on my own server
"newsNotify": "true",
client.channels.find("name", settings.modLogChannel).send(${key} successfully edited to ${value.join(" ")});
"modLogChannel": "mod-log",
why does it log stuff happening on this server?
how do I make it post on the guilds channel only?
Anyone know eris and is willing to help me out?
well sure(have u read the docs?)
Yes.
Wow I respond late don't I?
@lament meteor
Sorry for the tag.
But I got to fo this.
to*
what u need?
Depends which you wanna help me with?
Discord.js bot ain't responding.
Or
Eris making a new bot {first time using eris and first time using visual studio code and command prompt}
Which one you wanna help with?
Hi there
@bot.command(pass_context=True)
async def stop():
await bot.say('Shutting down..')
await bot.logout()```
How to make this command
For owner only?
And how can i make this command to be used in a server/dm and to response in dm?
Use bot.send_message(ctx.message.author, 'Shutting down..') and for owner only, you may use if ctx.message.author.id == 'YourIDHere'.
Thanks
❤
@slender thistle
File "bot.py", line 17
if ctx.message.author.id == '254198214415220738'
^
SyntaxError: invalid syntax```
Ask their support server
If someone knows python they will help
Yes
To set owner only
You don't need to ping
You use commands.ext?
@bot.command(pass_context=True)
async def stop(ctx):
await bot.say('Shutting down..')
await bot.logout()```
Where
Is okay to add at start?
At @bot.command
By adding the anonataion @bot.check(func)




