#development
1 messages · Page 493 of 1
client.channels.get
alright
you could have just checked it 🤔
What does this mean
code?
kh>eval let s = bot.guilds.find("id", "480359296715063296")
let p = s.channels.find("id", "483522909923704832")
p.send("test")
It’s not crashing
It’s always never fixed
explain the line var randmsgNum = ...
Yeah it crashed everytime it changed the game
step by step
It’s basically going into a Json file and finding a random message and applying it
And m is the name of the text line
So like “m”: “over the world”
that's not what i said
{
“m”: “Oof”
},
{
“m”: “thing”
},
then you should learn js
Probably
it returns a pseudo random number between 0 and 1
you multiply that by messages.messagelist.length
so you get [0, messages.messagelist.length]
then you floor it
to get an integer
so it's same range but as an integer now because array indexes are integers
then you add one
which makes it [1, messages.messagelist.length + 1]
but js arrays are 0-based

so you won't ever read the first element
and might read more than the last
which will be undefined
so you get an error
That did and didn’t make sense
basically, if your array has 35 items, they will be numbered from 0 to 34
and that code will give you a random number between 1 and 35
meaning 0 with never be chosen, and 35 will cause an error
'conda' is not recognized as an internal or external command,
operable program or batch file.``` i already installed the thing to use this but it isnt working 
did you restart the command line?
then its probably something with environment variables
sometimes you need to force them to refresh
or restart your pc
TypeError: Cannot read property 'client' of undefined
at new MessageCollector (c:\Users\User\Desktop\No name\node_modules\discord.js\src\structures\MessageCollector.js:22:19)
at client.loadUserData.data (c:\Users\User\Desktop\No name\commands\bal.js:9:35)
at db.collection.findOne (c:\Users\User\Desktop\No name\library\database_functions.js:29:13)
at result (c:\Users\User\Desktop\No name\node_modules\mongodb\lib\utils.js:414:17)
at session.endSession (c:\Users\User\Desktop\No name\node_modules\mongodb\lib\utils.js:401:11)
at ClientSession.endSession (c:\Users\User\Desktop\No name\node_modules\mongodb-core\lib\sessions.js:129:41)
at executeCallback (c:\Users\User\Desktop\No name\node_modules\mongodb\lib\utils.js:397:17)
at handleCallback (c:\Users\User\Desktop\No name\node_modules\mongodb\lib\utils.js:128:55)
at cursor.next (c:\Users\User\Desktop\No name\node_modules\mongodb\lib\operations\collection_ops.js:570:5)
at result (c:\Users\User\Desktop\No name\node_modules\mongodb\lib\utils.js:414:17)
I keep getting that error but I can't figure out how to fix it
How can you find a channel by it's name
isn't
let channel = message.channel.find(c => c.name => "channelname")
?
Anyone know of a way to exclude a discord server from client.users.size (discord.js); trying to get a more accurate user count
message.channel.send(client.guilds.size - 1) @clever radish
@boreal drum they said from client.users.size
@clever radish you could just subtract the amount of cached members in the server, however that will also remove people who are in multiple servers including that one
To be honest cached user count isn't really an important statistic
Hmm, what would you recommend then for seeing the number of users from client.guilds? Trying to avoid just looping through all guilds and getting memberCount, but not sure if something else exists
filter through each guild and get member count
then add them all together
that's pretty much to only way unless you want to cache each user
Which would kinda fuck your memory
True, haha; guess I'll do the loop then
Was surprised the api didn't have something specific to do the count
d.js doesn't cache all users for that reason
Makes sense, thanks for the help
Hi.
Hi
Bye
no u
Try reloading the site with ctrl+shift+r then register the bot again
@earnest phoenix
Okay. I just told you how to do it
Lol
Then just clear the cache in your browser for that site and reload it @earnest phoenix
(You can do this on mobile)
YOU'RE WELCOME
Lmao he got muted and left
Lol
Is there a free, collaborate site to make a bot in py?
but on a site?
so basically https://glitch.com for python
Codecademy or CodeHS Sandbox?
It won't deploy from there ofc
But you can atleast code it
thanks
on a separate topic, how can i get data from https://discordbots.org/bot/476609928023244801# to show in html site?
hi quick question how do i make my bot online because my bot was declined the fist time because it was offline when they look over it PLEASE HELP
just submit again
node.js ?
I'm going to have to assume that it's the same thing as normal shards
?
shards = multiple processes
a single process is limited to 2500 guilds, so a bot that is in 4000 guilds for example needs to have 2 shards, meaning 2 processes, each processing approximately 2000 guilds
Can anybody help me make my bot?? Ociean
Thanks Tim
How can I (for example) make a typerace command
Discord.js
It checks for the next message to be x
But you have 30 s
a shard is just a connection to discord
Thanks
and discord forces all shards to have 2500 guilds or less
or they won't be able to start
Ok
Yo can someone help me make a slowmode Command?
@hollow mauve iirc it's not in any libs yet do you'll have to directly access the api
catnip has it :^)
@bright spear actually its in d.net lib

14 days ago https://i.imgur.com/j8vm5Ln.png
@prime cliff iirc certified libs aren't allowed to include unreleased features
they are

but they usually don't because until it's officially released the api might do breaking changes
so you'd waste effort
and it could even be removed
Can someone help me with something?
How I want it to look
Tue Sep 25 2018 10:00pm/am
Any ideas on how to get it too look like that
It is in an embed btw
@lusty dew
const embed = new Discord.MessageEmbed()
.setTitle(action)
.setColor('#00FF00')
.addField(userType, checkUser.username + "#" + checkUser.discriminator, true)
.addField("Moderator", message.author.username + "#" + message.author.discriminator, true)
.addField("Reason", reason)
client.channels.get("493476991459393551").send(embed)
how do I send the embed message id?
I tried embed.id, embed.message.id, nothing works
how...? lol
discord.py rewrite
member.add_role(guild.id, user.id, role.id, reason=reason) not working
Traceback (most recent call last):
File "C:\Program Files\Python36\lib\site-packages\discord\client.py", line 224, in _run_event
yield from coro(*args, **kwargs)
File "C:\Users\raspberry\Documents\GitHub\CookieBot(test2)\run.py", line 256, in on_member_join
await member.add_roles(guild, 'test', reason="Automatic Role assigment")
File "C:\Program Files\Python36\lib\site-packages\discord\member.py", line 513, in add_roles
yield from req(guild_id, user_id, role.id, reason=reason)
File "C:\Program Files\Python36\lib\site-packages\discord\http.py", line 214, in request
raise NotFound(r, data)
discord.errors.NotFound: NOT FOUND (status code: 404): Unknown Role```
i even tried member.add_role(user.id, role.id, reason=reason) same results
and i did \@role to get role id
please ping me if u have a clue what im doing wrong i been at this for 40+ min now
or dm me what ever is easier for you
did they change .fetchMessage in discord.js v12?
<TextChannel>.messages.fetch(params) https://discord.js.org/#/docs/main/master/class/MessageStore?scrollTo=fetch
Thanks! @gilded blaze
module.exports.load = (client) => {
client.commands[`purge`] = {
run(message){
if(!message.member.hasPermission("MANAGE_MESSAGES")) return message.reply("Sorry you can't use this command")
if(!args[0]) return message.channel.delete("Rip")
message.channel.bulkDelete(args[0]).then(() => {
message.channel.send(`Cleared ${args[0]} messages`).then(msg => msg.delete(5000))
})
}
}
}
Can someone help me?
It says args is not defined
but idk how to define args
well
where did you get that from?
args is never defined
you probably need to be passing more than just client from the looks of it
Okie
But
The way I have my stuff set up
it only needs client
to be passed
Oh wait
I think i know how to fi it
fix*
background: linear-gradient(135deg, #FE3383, #FD8E14); why isn't this working?
i just get a white bg
How cna I restrict a command to one channel?
So it can't be used outside any other channel
@lusty dew in the command, return if the channel id isn't the id of that channel
if (msg.channel.id !== "allowed id") return;```
ie. in djs ^^
np
I got the automatic role assigment to work after 50 min XD
How do you update something daily in the background automatically in python3?
Like every 24hrs
have you used the code for the python DBL api?
it gives a good example of an async loop that you can run, then wait for 24 hours to run again
you can make a randomizer that chooses the "daily background"
I don't need it for the api but feel free to link me
I'm not trying to post my api count, I already got that. The background app is for something else...
Thanks!
note how the update_stocks() function is run every 3600 seconds in async
1 day is like 86400 seconds
Ah, I see. That makes tons on sense. Is there any way I can see how many seconds I got left in the loop before it refreshes?
I could use datetime module
you can make it trigger like every 30min, but have an if statement when time.time() = [12:00am]
i see how but will it take up memory checking every second?
pls don't do it every second
python'll usually dispose of extraneous memory, but every second may lag the async loop
maybe like 5-10minutes
oh be sure to account for accedentally going over 12:00
Yeah, what i'm gonna do is check if the date changed every 10 minutes and if so, I run code to generate the scopes.
http://prntscr.com/kysb1l anybody that knows this error ?
def __init__(self, bot):
self.scopes = ["coins", "hp", "damage", "nekobucks", "event", "moves"]
self.today = '2018-7-6'
self.bot.loop.create_task(self.update_scopes())
async def update_scopes(self):
now = datetime.now()
day = '{}-{}-{}'.format(now.year, now.day, now.month)
if day != self.today:
fields = ["coins", "hp", "damage", "nekobucks", "event", "moves", "nothing"]
today_scopes = []
for x in range(1,7):
today_scopes.append(choice(fields))
self.scopes = today_scopes
self.today = day
await asyncio.sleep(900)
@cold harness
That looks nice, ty.
nice
@slate kayak it means your bot cant access that resource/channel
Can anybody help me making my bot?
a multipurpsoe all in one moderation bot 
Well thats something very fresh xD
yes 
Why dont u try something different?
i only got discord.js stuff
Hi, how do i add my bot to this server?
.....???????????
@rustic obsidian Https://discordbots.org/newbot
@feral swift we're not gonna teach you how to code, go to those sites and learn discord.js and come back when you have a specific question
i am just askin, does anyone wanna do a bot with me
I doubt it
I think it broke on me lmao
It says "Max 140 chr" but says i need atleast 300.
"Too short" and then "Too long"

Nevermind i got it.
Max 140 is for the short desc
ye i would doubt it
Min 300 is for the long desc
help
can somebody tell me why is ${client.guilds.size} and ${client.users.size} only display 0 rather than before which is 10 and 11097?
if you set those variables in a global scope before your bot logs in and then reference those variables, they will do that
ex:
client.login();
client.once("ready", ()=> {
update();
});
const statuses = [
[`with fire | ${client.users.size} users`, "PLAYING"], [`dumb code | ${client.guilds.size} servers`, "WATCHING"]
];
const update = () => {
let [name, type] = statuses[Math.floor(Math.random() * statuses.length)];
client.user.setActivity(name, { type });
}
When the status is set, it will display as 0 because when you create a new client, it uses an empty client object then logs in and then fetches objects from discord and fills that data. and since you're not waiting to log in and that code is in a global scope, it inherits the empty client's object and properties
to fix this, you'd have to put statuses and update inside the ready event
ok
@gleaming glen benim botum neden atıldı burdan
Other Lang's in #memes-and-media 
@topaz fjord
also rainbow roles isn't allowed
what where
mfw you gets ads on pastebin
lmfao
regenerate your token, cause I still have the pastebin page open the one with your token
@topaz fjord
sigh, ignoring me twice in a row 
Found your problem
You defined it as bot but you used client at the bottom
Also Regen your token
And rainbow roles aren't allowed
turtle since he is only listening to you tell him to regerenate his token
client.on("message", (message) => { if (message.content.startsWith("/kick")) { // Easy way to get member object though mentions. var member= message.mentions.members.first(); // Kick member.kick().then((member) => { // Successmessage message.channel.send("👋 " + member.displayName + " has been successfully kicked 👉 "); }).catch(() => { // Failmessage message.channel.send("Access Denied"); }); } });```
This line is not defined
@topaz fjord I replace it by what client
var prefix = ("+");
it should be bot.on

thanks
It should be bot.on since you defined it as bot
And like I said you don't need more than 1 message event
at RESTMethods.login (c:\Users\Invite\Documents\Bot\node_modules\discord.js\src\client\rest\RESTMethods.js:33:12)
at Client.login (c:\Users\Invite\Documents\Bot\node_modules\discord.js\src\client\Client.js:279:30)
at Object.<anonymous> (c:\Users\Invite\Documents\Bot\main.js:13:5)
at Module._compile (module.js:650:14)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
(node:2352) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)
warning.js:18
(node:2352) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
warning.js:18
1
Li 282, Col 5Espaces : 4UTF-8CRLFJavaScript00Attachement automatique : Désactivé
invalid token
oh
or codeblock
still cancer on mobile
who uses mobile
seems fine, when you got used to it
thanks you
i use mobile when im away xD
bot is ready
and i review and do eval on mobile mostly
Can't do eval on mobile since auto correct
at Function.Module._load (module.js:498:3)
at Function.Module.runMain (module.js:694:10)
at startup (bootstrap_node.js:204:16)
at bootstrap_node.js:625:3
Waiting for the debugger to disconnect...
SyntaxError: await is only valid in async function
vm.js:80
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:617:28)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Function.Module.runMain (module.js:694:10)
at startup (bootstrap_node.js:204:16)
at bootstrap_node.js:625:3
@topaz fjord ?
- dont random ping
- make it an async function
huh
- you need to be inside an async function (or closure) to use await
as the error says
- learn to not copy paste code
x(()=>{
await y(); //wrong
})```
function x() {
await y(); //wrong
}```
async () => {...}
and
async function ... would fix it
Hi ! how can i send custom emoji on discord.js ? i tried so many things and it won't work 😦 ?
not working and i dont know why x)
message.channel.send(":qmark:494465837420380170")
not like that
forgot the <>
yea
https://i.imgur.com/BpA5h3P.png i fucked it up but u get the point since d.js converts it automatically
it would be message.channel.send('<:emoji:emoji-id-here>')
you know how to get that?
np
😄

@lament meteor cdseconds is 15000
wats the cool down stuff @earnest phoenix show that part of the code
wried
Anyway gtg
Anybody cding with JDA?
npm ERR! errno 1
npm ERR! integer@1.0.7 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the integer@1.0.7 install script.
npm ERR! This is probably not a problem with npm. There is likely additional log
ging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Thyke\AppData\Roaming\npm-cache\_logs\2018-09-26T12_52_20_
836Z-debug.log
C:\Users\Thyke\Desktop\Vice'sss>``` Error when installing quick.db
help
me
i made a website i got the domain now how do i host it using nginx on windows
I am trying to make it so if they say
-coinflip heads and it lands on heads they get 5 coins tails they get 5 coins taken away
or vise versa
module.exports.load = (client) => {
client.commands[`coinflip`] = {
run(message){
client.loadUserData(message.author.id, data => {
let coin = ["Head", "Tail"];
let result = coin[Math.floor(Math.random() * coin.lenght -1)]
})
}
}
}
This is what I have so far
@lusty dew coin.length*, not lenght
i mean you could use a db like mongodb, mysql or postgres
Yea
Problem is
I don't remember how to detect if they say heads or tails
and for it to match up with what is sent out
let coin = ["Head", "Tail"];
let result = coin[Math.floor(Math.random() * coin.length -1) * 2]
Also
It is only sending out Heads
and not Tails
when it tries I get an error
try coin[Math.floor(Math.random() * coin.length)]
Maybe I should get rid of that -1
yeah
Yea
That worked
Also
How would I check if what they say matches with what is put out?
Ok
`(node:9414) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'id' of undefined
at Object.module.exports.run (/app/commands/points.js:4:32)
at Client.client.on (/app/server.js:62:31)
at emitOne (events.js:116:13)
at Client.emit (events.js:211:7)
at MessageCreateHandler.handle (/rbd/pnpm-volume/8f2a7c19-de8e-4c4e-9bbb-ea649f9acb17/node_modules/.registry.npmjs.org/discord.js/11.4.2/node_modules/discord.js/src/client/websocket/packets/handlers/MessageCreate.js:9:34)
at WebSocketPacketManager.handle (/rbd/pnpm-volume/8f2a7c19-de8e-4c4e-9bbb-ea649f9acb17/node_modules/.registry.npmjs.org/discord.js/11.4.2/node_modules/discord.js/src/client/websocket/packets/WebSocketPacketManager.js:103:65)
at WebSocketConnection.onPacket (/rbd/pnpm-volume/8f2a7c19-de8e-4c4e-9bbb-ea649f9acb17/node_modules/.registry.npmjs.org/discord.js/11.4.2/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:333:35)
at WebSocketConnection.onMessage (/rbd/pnpm-volume/8f2a7c19-de8e-4c4e-9bbb-ea649f9acb17/node_modules/.registry.npmjs.org/discord.js/11.4.2/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:296:17)
at WebSocket.onMessage (/rbd/pnpm-volume/8f2a7c19-de8e-4c4e-9bbb-ea649f9acb17/node_modules/.registry.npmjs.org/ws/4.1.0/node_modules/ws/lib/event-target.js:120:16)
at emitOne (events.js:116:13)
(node:9414) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)` error on discord.js
for the top bit
const key = `${message.guild.id}-${message.author.id}`;```
and i dont understand the other
console.log(message.guild)
console.log(message.author)
one of them is undefined
console.log((!message.guild ? "guild is undefined" : (!message.author ? "author is undefined" : "everything is fine")));
one liner
@lusty dew you can compare the message (message.content) with your coin result string
If the message was in a dm, then guild will be undefined
Check message.channel.type or if message.guild is null
client.on('message', async (message) => {
if(!message.guild.type) {
let log = '438733159748599813'
message.log.send(args)
}```
Are you trying to check if the channel is a dm?
message.channel.type === 'dm'
so will this work now...
That's also not how you send a message to a channel with id
client.on('message', async (message) => {
if(!message.guild) {
let logger = '438733159748599813'
message.logger.send(args)
}}```
that is my id
client.channels.get("idhere").send()
You cant just attach a string to message and send to that
client.user.get('438733159748599813').send(args)
client.channels.get('438733159748599813').send(message)
so i have this js client.on('message', async (message) => { if(!message.guild) { client.channels.get('438733159748599813').send(message.content) }
is that good?
Detailed description of your bot *
HTML & Markdown allowed, minimum 300 characters
1
i just copy paste here
@wide ruin I did it
i do not know how to description
Write more
didnt have anything
maybe
Is there an error?
client.on('message', async (message) => {
if(!message.guild) {
client.channels.get('438733159748599813').send(message.content)
}
if (!message.guild || message.author.bot) return;
let user = message.author.username;```
that area of code
Are you sure that's the right id?
Not according to the error
i copied my id again and it was right
Did you mention the channel and right click the mention to get id?
i right clicked me and selected copy id
Oh, it's your id?
is that right?
Then replace the .channels with .users
Heh
how many times did you send it?
Once before the error, once after
The bot is responding to itself
Check if message.author.id equals client.user.id
client.on('message', async (message) => {
if(!message.guild) {
if(!message.author.id === '476609928023244801') {
client.users.get('438733159748599813').send(message.content)
}}```
The ! goes in the === to make it !== not in front of message.author.id
👍
is there a way i can dm them back?
so what would it look like?
I'm not a js dev ¯_(ツ)_/¯
ok , can someone help me , Im trying to make a !setchannel command in py async , to let the welcomer send in the mentioned chat ...
but how would that work 🤔
well probably save the channel is in a database when the command is used
ye ik , but I need the server ID too no ? to let the bot see on what server someone joined 🤔
my way of doing that would be defining a dictionary
a server id is the key and the channel id is the value
mmm
Is there a way to log upvotes?
listen to votes with a webhook and log them?
Yes
yes
Where do I find the info about how to do it?
client.on('message', async (message) => {
if(!message.guild) {
if(message.author.id !== '476609928023244801') {
let embed = new Discord.RichEmbed()
.setTitle(message.content)
.setDescription(message.author.tag)
.addField('ID:', message.author.id)
client.users.get('438733159748599813').send(embed)
if(message.author.id === '438733159748599813') {
if(message.channel.startsWith('//dm')) {
message.content.split(message.mentions.first)
let msg = message.mentions.first
msg.send(message.content.split(message.content.split(message.mentions.first)))}}}}``` i got a message from them, and when i did //dm <@their id> hi!, they got nothing sent by the bot
discord.js
any idea?
@sullen path
don't ping random people
They were helping me earlier
It's the same DM command stuff
can we have a dev channel for people who have some tiny morsel of critical thinking skills
also he said he's not a js dev so pinging him will help you in no way
splitting by mention
msg.send(message.content.split(message.content.split(message.mentions.first)))}}}}
dm command in the first place
if you clean your code you'll be able to maintain it way easier
@wide ruin I already said, I'm not a JS dev
he's been asking dumb q's for ages. never bothered to learn
no ping pls
it should be
for asking for help with "cannot read property xxx of undefined" in #development or asking what a webhook is in #topgg-api
dbl needs to crack down
anyone know a loop command for discord.js/node.js
what do you mean @earnest phoenix
C:\Users\samurai\Desktop\dat files\Bots\Python\Botta>py -3 botta.py
Traceback (most recent call last):
File "botta.py", line 1, in <module>
import discord
File "C:\Users\samurai\AppData\Roaming\Python\Python36\site-packages\discord\__init__.py", line 20, in <module>
from .client import Client, AppInfo
File "C:\Users\samurai\AppData\Roaming\Python\Python36\site-packages\discord\client.py", line 30, in <module>
from .guild import Guild
File "C:\Users\samurai\AppData\Roaming\Python\Python36\site-packages\discord\guild.py", line 38, in <module>
from .channel import *
File "C:\Users\samurai\AppData\Roaming\Python\Python36\site-packages\discord\channel.py", line 32, in <module>
from .webhook import Webhook
File "C:\Users\samurai\AppData\Roaming\Python\Python36\site-packages\discord\webhook.py", line 27, in <module>
import aiohttp
ModuleNotFoundError: No module named 'aiohttp'
C:\Users\samurai\Desktop\dat files\Bots\Python\Botta>pip install aiohttp
Requirement already satisfied: aiohttp in c:\program files (x86)\python36-32\lib\site-packages (1.0.5)
Requirement already satisfied: chardet in c:\program files (x86)\python36-32\lib\site-packages (from aiohttp) (3.0.4)
Requirement already satisfied: multidict>=2.0 in c:\program files (x86)\python36-32\lib\site-packages (from aiohttp) (4.3.1)
Requirement already satisfied: async_timeout in c:\program files (x86)\python36-32\lib\site-packages (from aiohttp) (3.0.0)
C:\Users\samurai\Desktop\dat files\Bots\Python\Botta>``` wtf is happening
did you import aiohttp?
no
installing it with pip is not necessary, while importing it to your base code is
wha
just do import aiohttp in your code
then what are you trying to do, and what is your issue
he imports discord then discord returns no module named aiohttp 
oof
@knotty steeple is in diff location http://you.can-fuck.me/xi89.png
py -3m pip install aiohttp
Unknown option: -3 usage: C:\Users\samurai\Anaconda3\python.exe [option] ... [-c cmd | -m mod | file | -] [arg] ... Try python -h' for more information.`
pls

py -3 -m pip install aiohttp
distributed 1.21.8 requires msgpack, which is not installed. discord-py 1.0.0a1536+gfdc7169 has requirement aiohttp<3.4.0,>=3.3.0, but you'll have aiohttp 3.4.4 which is incompatible. pylint 1.8.4 has requirement astroid<2.0,>=1.6, but you'll have astroid 2.0.4 which is incompatible. 
😩
smh
uninstall python
lmao
Ignoring exception in on_ready
Traceback (most recent call last):
File "C:\Users\samurai\AppData\Roaming\Python\Python36\site-packages\discord\client.py", line 221, in _run_event
await coro(*args, **kwargs)
File "botta.py", line 30, in on_ready
bot.load_extension("cogs.info")
File "C:\Users\samurai\AppData\Roaming\Python\Python36\site-packages\discord\ext\commands\bot.py", line 694, in load_extension
lib = importlib.import_module(name)
File "C:\Users\samurai\Anaconda3\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "C:\Users\samurai\Desktop\dat files\Bots\Python\Botta\cogs\info.py", line 4, in <module>
import psutil
File "C:\Users\samurai\AppData\Roaming\Python\Python36\site-packages\psutil\__init__.py", line 147, in <module>
from . import _pswindows as _psplatform
File "C:\Users\samurai\AppData\Roaming\Python\Python36\site-packages\psutil\_pswindows.py", line 17, in <module>
from . import _psutil_windows as cext
ImportError: cannot import name '_psutil_windows'```
this is the
uh
traceback
@solid cliff

disable psutil 
smh cannotfind anything
hi i am new to bot making after it gets approved can i still edit the code
@junior hornet yes...?
only have anaconda installed
yes
and not actual python
thx
@solid cliff
whyneed anaconda
inb4 doesn't work4u
oof
lok
smh
Can somebody tell me is there a way to run a discord bot with multiple coding languages?
Why would you want to though
How can I create an instance?
. -.
like
just
lets say
you have a bot running
with the lib d.js
you can run the same bot, under the same token, in a different lib, or same lib
Does it still works?
what
depending on what you use you can have multiple languages in one instance
eg graalvm can mix java, python, js, ruby and r in a single instance
Because why not? XD @knotty steeple
Because I just noticed I am not really good at js than python
rewrite the bot like pls 
gcc should be just a single command
to install
there's stuff that's easy to do in lang x and stuff easy to do in lang y
how tho
Actually I was just asking
and normally running both in one process you can get more performance out of it
Ok gtg bye
i need to install on windows
Plus do not go it music #1 are else you will hear a song full with inappropriate things
“Inappropriate”
Ok the song finished lol
bye
Your bot @oblique sundial was declined. Reason: Open eval, I think - https://imgur.com/a/oDJTm3m
How to fix it
hola alguien habla español aqui?
no
O.o
Hey im trying to work on A bot that helps yo build rollercoatsers but never started on discord bots before
wat
im trying to make a bot that makes images of roller coasters and theme parks for ya
but have no idea where to start
what programming languages do you know
C#
makes images?
if you want like legit random image generator
i would start out with getting assets and pngs of rides and such
a background image
and set locations on that backgroudn images where rides are allowed to be placed
and then randomly select images to fill those locations when you generate
Ok
I need help
try{
if(Fam.Niya.includes(message.author.id)) return message.channel.send('**Ɛ>** __I Wuv Yue__ **<3**')
if(Fam.owner.includes(message.author.id)) return message.channel.send('you are an owner\n (Test A1)')
}catch(err){
console.log(err)
}
message.channel.send(`A direct message?\n I've heard these places are scary... Please message me in a server, ${message.author.username}`)
}
It is not sending
message.channel.send(`A direct message?\n I've heard these places are scary... Please message me in a server, ${message.author.username}`)
}
This one
It's not in the catch { }
Oh ok
it should still work regardless
the catch block doesn't return so it just executes what's below
but I don't see a reason why you would keep it outside tho
that'll work either if it throws or if none of the ifs match
Full code^
the
Fam.Niya and Fam.owner
the ID for the Fam.Niya
is also in owner
so when the user named Niya dms the bot it only sends one of those messages
and not the one with the Fam.owner
Because you return after the Niya check
ah ok
my bot is not posting server count
🤔
client.on('ready', async () => {
await client.log('Successfully connected to discord.')
await client.user.setActivity(client.settings.activity, { type: 'Playing' }).catch(e => client.cannon.fire('Could not set activity.'))
await client.log(`Successfully set activity to ${client.settings.activity}`)
await client.loadCommands(() => client.log(`Successfully loaded commands!`))
await client.loadNPC(() => { client.log(`Successfully loaded npc's`)})
await client.connectDB(() => client.log(`Successfully connected database.`))
if(client.settings.devmode == false){
const dbl = new DBL(client.settings.DBL_token, client)
dbl.on('posted', () => {
client.log('Server count posted!')
})
}
})
settings.json contains
{
"devmode" : false
}
and the token is correct
@earnest phoenix this is how I did mine and I know it works
dbl.postStats(bot.guilds.size)
Where dbl is defined by a const above it
const dbl = new DBL('token', bot);
by that logic cant i manipulate the number just by passing it one?
Yes.

As far as I'm aware it's not safeguarded in any way it's just that mods exist and could spot the significant difference
what kind of logic is that?
But as well as bot lists put trust on the devs that they won't do such things
some neat client property cross refrencing could help that
Like I said I'm not sure if it's safeguarded or not, my knowledge at this moment tells me it's not
im willing to say its against their TOS
if anything
but going back to my question
poststats is required?
I'm sure you'd get your bot deleted and possibly you banned for doing that 
you mean dbl.postStats?
mhm
how else are you gonna tell it what to post 
well it has done it with what i have all the way up to this point
maybe its cause im running it with pm2 not allowing it to reset entirely 🤔
I gave you the way I do it and it's never not worked for me
still no
🤔
thoroughly confused
client.on('ready', async () => {
await client.log('Successfully connected to discord.')
await client.user.setActivity(client.settings.activity, { type: 'Playing' }).catch(e => client.cannon.fire('Could not set activity.'))
await client.log(`Successfully set activity to ${client.settings.activity}`)
await client.loadCommands(() => client.log(`Successfully loaded commands!`))
await client.loadNPC(() => { client.log(`Successfully loaded npc's`)})
await client.connectDB(() => client.log(`Successfully connected database.`))
if(client.settings.devmode == false){
const dbl = new DBL(client.settings.DBL_token, client)
dbl.on('posted', () => {
client.log('Server count posted!')
})
}
})``` ```
{
"devmode" : false
}```
reposting for bump
whats wrong 🤔
maybe its because its async?
let me pull out of the func
Wait since when was a .then not required
yea thats why
for dbl.on
it twas because it was in an async function

was woundering why it would never update
now i know
dbl does not like being forced asynchrony
i need to write a better docs
:/
👍
i keep mine on a website and the dbl description xD
the dbl description for mine is a mile long
now
I have it setup for upcoming bit of docs tho
i just wrote some quick pretty animations, grabed a css framework, and threw something together
not mobile friendly by any means
wanna check it?
I need some help with an html to image gemerator for my core .net bot on c#, i know a good one thats called NReco but thats only free on a framework and my bot is core, are there any free html to image generator dll’s that are free and support core? If so please dm me or ping me with the answer because it would mean the world for me if i finally have image generation on my core bot!
@restive silo no just html code to image
So i can make custom images
We have a guy in the crew that knows how to make it but we dont have a package or anything to do it with :/
@restive silo you can
More about CSS and HTML: https://youtu.be/1QABkDqKFns Tutorial series about making a Discord bot in C#.NET. Having a problem? Join our Discord and ask: https...
if you want render html as an image i would recommend this https://github.com/ArthurHub/HTML-Renderer
its cross framework and supports core
Hmm ill look into it
We just want have the image generation finally so we can make certain things more fancy
Like we have searched for 2 weeks now lmao
well you can also generate images without that but why do you even want html code to image
like
just do magick.net tbh
whats an imagemagick implementation into C#
We dont know how to use magick.net and nobody has time to learn it because of college and stuff and 1 of the guy knows how to make fancy image generation with html but he did it on framework
So that saves us time
meh
would probaly still recommend looking at Magic.net since its extremly easy to get into if you know C# and its performant while having a nice Interface
but yea
your choice
We will probably switch once everyone has time like most of 2 have work, 1 has exams and im just very busy with the hospital rn
But maybe i can try to get to do it now with then
Them*
Wym?
if you wanna have a performant way of image generation what would even work performant with idk 20k servers i would compare different ways & libs to do it
because if you dont and choose a lib/way whats bad you would need to rewrite later
Yea ill think im gonna try to push the idea of magick.net to my crew
what kind of image generation? what do you want to do?
Welcomes image, game stats for example, fancy profile even maybe some more unique things
C# image manipulation, ImageMagick implementations are quite common for that like Pythons Wand, C# Magic.Net and Co
I also wanna use it for my side bot thats sorta like a scifi/space themed rpg bot
to display in a website its much better to use client-side image generation, like canvas and svg
for a bot you need server side
he wants for a C# bot
^^
for node i would probaly recommend Canvas thats backed by Cairo
c# does have a canvas class
only framework or
he wants for .Net core
also i heard that Microsoft wants to ditch .Net framework and only Continue support for Core aswell as implement the stuff form .net framework into it somehow
not to sure about that
Im about 1 thing sad that is we arent allowed to make users download any .exe file even its from a site that would be able to edit the bot through a winform else it would be way easier to make a dashboard then through site, but that just means my crew need learn php and such thats fine i guess
you want users to edit an image through a website dashboard?
and then send the image to the bot?
No no just an web dashboard ins general, it basically a whole different problem we have because nobody knows how to make a webdashboard
We will maybe soon tho who knows lol
@restive silo do you use magick.net for any image generation? Or do you even have image generation or such
Hi everyone ! i woud like to know if there is any way i can eval the server names my bot is in ?
go through all servers your bot is in and append their names into a list, then print that list as one string
👍
Sorry :p
i just found what i'm searching for thanks and i'll remember to read the docs first 😉
@earnest phoenix can I get that read the docs emote? I’m on mobile so I can’t do the thing
👌
status = ['with ZeroLand', 'z!help for help', 'on {}'.format(client.servers)] so my bot doesnt plays the servercount , but says Playing on dict_value([])
show more code
How can I make it so I can ban the person by ID and by mention?
What lib?
Discord.js
I'm sure there is a way in d.js to define the argument itself to default to a member object
Could i Do
let userID = message.content.split(' ').splice(1)
let bUser = message.guild.members.get(userID)
I know that gets everything after the command name
I honestly only want it to get the ID I say so it doesn't get the reason
splice modifies the original input. so if you save the message array in a variable, and use splice on it, then the original array gets modified as well
I know what he wants
Use the logical or operator
If the mention is null, fetch the user by ID
example for how to split the id from the ban reason in a message```js
let array = message.content.split(" ");
let id = array.splice(1,2);
//array = content 0 and 2 (splice removed content 1 from the original array)
//id = content 1```
@quartz kindle shh...this is irrelevant
xD
how is this irrelevant? its basic js
discord.py has it's own way to defaut the argument to be a specific object you want, for example:
@commands.command()
async def ban(ctx, member: discord.Member)
```doesn't discord.js have something similar to that?
@earnest phoenix i dont do C# image manipulation but i have friends who do and told me that Magic.net is really good
thats why i recommend it
@quartz kindle because that's not what he asked at all
I want to be able to ban by iD and Mention
I know that gets everything after the command name I honestly only want it to get the ID I say so it doesn't get the reason
this denotes confusion regarding how to separate and assess the parts in a message content
https://puu.sh/BBQJn/5beaeddbac.png this was his actual question
Yes
im just clearing up his confusion
that is a requirement before even tacking the question itself
Oh there was confusion?
Hm?
Can't deny that haha
Helping me for days?
Maybe I assume people's knowledge too much
.
Damn @restive silo im a lil sad about that because if you did i cpuld have asked you sometimes for help with it
sorry about that
Its fine
Im mostly thinking about how i could as an url like my avatar url link to add to a for example profile command because idk if magick.net accepts url images if that makes sense
you would download the image to an byte arrary and then work with it
Ah ye
Its more work but if it works its okay i guess 🤷🏼♂️
But still depend what my crew thinks of the idea tho
banning by id/mention can just use a regex to extract ids from mentions
(?:<@!?)?(\d+)>?
replace that with $1
eg arg.replace(/regex/, "$1")
It says message is not defined right in the error
french
windows
property of undefined
on desktop
no text editor
roblox AND fortnite 
this has to be a joke post there is no way that guy is real
hey i use windows pls
do u run or bot on windows?
no i have a host 

@earnest phoenix dont forget about the (cracked?) minecraft 
haha yes
yuh
not a number
and I just found out we're gonna learn java
ok...?
any of you guys have good sites that can prepare me a bit
hm
library
codecademy
google whats that
no I just wanted to know what you recommend from your personal experience lol
i havent learned java on codecademy
wait how is reportschannel undefined
it is clearly defined there
but i have learned a few other langs on there
np
@granite tartan dropout
heck off oliy

Lol
Java is shit
Hi I forgot to add a sever count can someone help with the code it discord.js
Check #312614469819826177 's pins @junior hornet
Ok thx
How do I find out who Upvoted my Bot, like their IDs and info about it
Trying to make a Reward System on Upvotes
(Pls ping me if you're answering)
Oh ok discord.js
^ @junior hornet
boi
boi
:nigga




