#development
1 messages · Page 502 of 1
How do I get an invite link for my bot that redirects the user to a website without giving me the Unknown error?
You need to include a code grant which isn't supposed to be used when inviting bots
make sure you add the correct credentials, and add a redirect URI
can anyone help me here?
yea just ask, also what language? @earnest phoenix
i need help with making a random number gen because something is going wrong and idk what
should i use hastebin
or paste the section of code here
if the code is small, like less than 20 lines, use code blocks
have you tried using the rand function?
im sure there is one in js
iirc its Math.random()
kk
code block it please
var randomnumber = Math.floor(Math.random() * 101);
if (randomnumber < 101)
{
message.reply(randomnumber)
} ```
mhm
what does it reply
that will always be true
besides the number
randomnumber is not defined
did you misspell the variable name somewhere?
i only mention randomnumber in that section of code
aw
same
but i just do javascript for this idk why
i just like javascript for these types of things
rip nobody can help
Ok found the error so i dont need help
🎂
anyone know how to change my bot prefix its currently "!"
the language is javascript
how am i supposed to know what line its on??
no its not a issue i just want to know how to change my bot's prefix
Actually learn to code first.
literally
its the default "!" and i want to change it
nvm i found out how
i mean
if you don't know how to change you bots prefix
maybe stop stealing code
or learn how to use strings
Probably a dumb question, but a week or smthn back, my bot got declined because it had a public token? How do I make it private (discord.py)?
@mild quarry do you use github?
No
where was the token then
Actually nvm I switched hosters a while back
It should work now
I don't think anybody has access to the code at the moment
well you should be careful with the token because its basically the password to the bot
@mild quarry your token is still public btw
lmao
Hmmm
@hushed berry ad ^
What do you use for storing data? For a user level system for example.
I heard json files are prone to corruption
@timber olive databases will always be the best for storing data
client.channels.get('name', "kancer").send('some kancer message');
and it doesnt or
work
any ideas?
Did you put the correct var in 'some kancer message')
thats not how get works
get directly accesses the desired collection by ID: channels.get("CHANNELID")
wont that just give me problem
if i want to send message to logs channel
not every server uses same CHANNELID
client.channels.get('481054861497204739').send(embed);
either save each server's logs channel id in a database, or use find if you want to find a channel by name (but then your users need to create a channel with that exact name)
channels.find(channel => channel.name === "channelname") if i recall correctly
ReferenceError: channels is not defined
Lol
client.channels.find(channel => channel.name === "channelname")
gives no error but just doesnt send message
it probably found the channel in another server lmao
<guild>.channels.find()
where <guild> is the current guild you're working on
oh
client.guilds.find(g => g.id === "id").channels.find(channel => channel.name === "name") maybe like that
or message.guild.channels.find() if you're working on a received message
client.channels.find(channel => channel.name === "kancer").send("lkdfldfg")
that will send a message to the first channel called "kancer" it finds in ALL servers
It's an event right?
yes
@gleaming glen ur ne demek ?
!g6 dirrectsupport I need help w my bot in Lang JS. All we need is a proper moderation system and !help

I'm having some trouble with making a search array from an array element in a 2D array.
Hang on a moment, it's failing to send
here's the search array (with some context):
var trbiome = message;
// makes a new filtered array of the original array
let Array1 = List1.run("fill");
const search = Array1.filter(function(e) {
if(e[2].includes(trbiome)){
return e[2] == trbiome;
}
});
var rand = search[Math.floor(Math.random() * search.length)];```
here's two lines from the array it's referencing (look at the 3rd element to get an idea when I'm trying to do):
``` ["Grimtooth's Traps", "Mirror, Mirror, and the Fall", ["Wonders"], "Corridor", "Obstruction", 4, "./traps/mirror_mirror.png"],
["Grimtooth's Traps", "Delvermatic Dicer & Malingerer Trap", ["Wonders", "Mountain", "Jungle", "Grasslands"], "Door", "n/a", 4, "./traps/delvermatic_dicer.png"],```
I have used this on the other fields and it worked fine (with the if statement removed), I just don't know how to search within that inner array
this is my first time actually using github seriously, what is appveyor and how can I use it? or is it on github by default?
@sturdy chasm you can use a for loop inside the filter function or a filter inside the filter
Or a map
For example if you want to match Wonders, you filter and inside the filter check if current item is an array jnstead of a string, and if so, filter it again
There might be better ways to do it though, but that would work
If you need to search an array with unknown number of levels, you need a recursive function
literally can't figure out why this doesn't work
async def on_message(self, message):
if not message.server == None and not message.author.bot and not str(message.author) == "Jade#6135" and message.content.startswith('JD ') or message.content.startswith('jd '):
ModMessage = message.content[3:]
#print(ModMessage)
await client.send_typing(message.channel)
intent = detect_intent_texts("jade-204720", "j-i", ModMessage, "en")
await client.send_message(message.channel, "Intent: " + intent)
if intent == "Chatbot":
initBot()
msg = await client.send_message(message.channel, "...")
async with message.channel.typing():
print('\n' + str(message.server) + '\n' + str(message.author) + ": " + ModMessage)
await client.send_typing(message.channel)
answer = callBot(ModMessage)
await client.edit_message(msg, answer)
print("Jade: " + answer)
returns
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/discord/client.py", line 307, in _run_event
yield from getattr(self, event)(*args, **kwargs)
File "<ipython-input-19-814980f8bc58>", line 23, in on_message
async with message.channel.typing():
AttributeError: 'Channel' object has no attribute 'typing'
It literally says channel isn't defined
oof wrong error
now it's the right error
but uh help pls
i'm using the rewrite branch...
I think I may have solved my problem. I was on the right track with the e[2].includes, just wrong formation. I needed to lose the if statement, and just return e[2].includes(trbiome);. I only realized this after Tim's response.
@cold harness are you certain that you're using rewrite, because your code looks like async
I think he referring to typing just isn’t a thing
typing in the channel object is a method in rewrite version
check the version with: ```python
import discord
print(discord.version)
i need to reinvite my bot because i need to change permissions
Is it allowed to have bot with suffix and not prefix 😂
Just check for suffix in the end of the command message ¯_(ツ)_/¯
But why do you need it, I wonder? 🤔
@earnest phoenix they meant, because the rules of this server say bot commands have to be prefixed, can their bot commands be suffixed instead
probably not @fierce thorn
Just rofl?
Ik 😂
how do i fix bot tag css? https://gcloud.isabad.host/i/r7bcn.png
a.tag::after maybe
kk
@waxen quest that didnt work
Ok I'll try something and let you know if it worked
kk
a.atag::after {border-left: 10px solid #793a3a}
@earnest phoenix this worked for me
np 🤠
🤠
dumb question but
@client.command(pass_context = True)
async def adduser2(*args):
botargs = ''
for word in args:
botargs += str(word)
botargs += ' '
print(args)
print(args.message.author.id)``` I'm getting an error in the last line (there's a lot more to the script that I didn't include) that says "discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'tuple' object has no attribute 'message'". How do I properly print out the ID of the user while also taking arguments?
nvm
is there any way to remove this white https://gcloud.isabad.host/i/br512.png
yes there is wait a sec
#details .bot-img {
box-shadow: none !important;
}```
@earnest phoenix
thanks
so much better
@waxen quest how would i fix it on hover?
.atag::after:hover {border-left: 10px solid #f45342}
.atag:hover {border-left: 10px solid #f45342}
arent working
let me check
kk
Sorry but I'm not sure about that
hec
wdym "on hover"
like
how do i install botconfig.json on VCS
thats when i hover over
how do i install botconfig.json on VCS
@earnest phoenix it's happening 
lmfao
You dont install json
dude learn to code
you make a json file
then why does it give me dis
oh god not again
instead of paying $50 a week

because u cant read
and u copypastad ur code probs
Tom can u halp fix
on hover
it might be 2 divs
or the ::after
it gives meh dat
yeah im using that
.atag::after:hover {border-left: 10px solid #f45342} doesn't work
check my bot page maybe
otherwise idk sorry
busy rn gotta go
whats ur bot page
you have to move the botconfig.json to the right folder
tombot
and/or create it
it is in index
you dont have any tags

oohhh I might have his them lmaooo
sorry
i need botconfig in index 4 dis
idk if after support hover
let prefix = botconfig.prefix;
let messageArray = message.content.split(" ");
let cmd = messageArray[0];
let args = messageArray.slice(1);
let commandfile = bot.commands.get(cmd.slice(prefix.length));
if(commandfile) commandfile.run(bot,message,args);
maybe google
nono
i want to make it so nothing happens on hover
basically
bil
vill
could u help me
I was pinged?
let prefix = botconfig.prefix;
let messageArray = message.content.split(" ");
let cmd = messageArray[0];
let args = messageArray.slice(1);
let commandfile = bot.commands.get(cmd.slice(prefix.length));
if(commandfile) commandfile.run(bot,message,args);
what
can you read
ye
it says you dont have a botconfig
but i do
but you dont
yes
not in that folder
type pwd
nothing
lmfao
in your termina
i did

oh
your on windows
ic
ye
mk
what folder are you in
index
.js
folder
not file
holy fuck 2iq
yeah wheres your botconfig.json

how da fuck do i make one den?
do I see you putting js in node_modules
lmfao
learn a coding language
i am trying
don't make a discord bot to learn a coding language
wait did you make this or did your $50 a week guy
i did
the current state of the bot
that?
i am learning
make a coding language by going to https://codecademy.com or other sites
making a discord bot isn't how you learn coding
^
same
im very confused
why the fuck
on hover
does it go partly blue
i am not coding is that
@client.command()
async def adduser2(member: discord.Member, *, args):
print(member.author.id)``` idk why I keep getting this error with this code: `discord.ext.commands.errors.MissingRequiredArgument: member is a required argument that is missing.`
if (!VC)
return;
VC.join()
.then(connection => {
const dispatcher = connection.playFile(`Luis Fonsi - Despacito ft. Daddy Yankee.mp3`);
dispatcher.on("end", end => {VC.leave()});
})
.catch(console.error);
});
The bot joins the channel but never plays, why is this?
dispatcher.on(
there some for error
listen to that maybe will give a clue
wut
english plox
ok it joins but never plays
hmmm
there is a listener for the 'error event on the dispatcher
there is no error...

not if you dont listen for it
in the event
oh sht
ok
ur killing me
ill look at the docs
afk
does anybody know the answer to my question above? ^^
missing required argument
well obviously :p It says that in the error
not familiar with .py lib but most likely you are not passing discord.Member as the first arg
Ok
oof
im missing ffmpeg
i think
well at least now u gotg the error
there is ffmpeg-binaries node module
or install it on ur system another way
for more updated versions
uh huh
thx
use lavaloink
lavalink 
@topaz fjord don't you remember those good old days back in Root's server? 
You used to ask about every little thing
I'm glad that you've taken time to learn
how to fix 
thats while hovering
not hovering: https://gcloud.isabad.host/i/sm267.png
Hey
Why does my bot leave my VC and join another VC when the command is run again?
``` if (msg.startsWith(${prefix}play despacito)) {
var VC = message.member.voiceChannel;
if (!VC)
return message.reply("you aren't in a voice channe, silly!")
VC.join()
.then(connection => {
const dispatcher = connection.playFile('./despacito.mp3');
dispatcher.on("end", end => {VC.leave()});
})
.catch(console.error);
}
Use :onhover and set the color to red
Anyone available to help?
but like i want it to be able to be in multiple
lmfao
it can't
how do the big bots do it then?
shards?
the bot can only be in one voice channel per server
thats not how discord work
How would I get a terminal to open and it run the command "nodemon index.js" as I am lazy (Mac Os)
ohhh
Dobble click a File I am looking for
makes sense
Ok
@abstract crystal any idea if message.attachments[0].save(fp="images/custom_img_1.jpg") would work in the rewrite version of d.py?

like what does it mean when the api says
coroutine save(fp, *, seek_begin=True)
^ tf does this mean
tom i've been reading the docs that's why i'm confused
Wow You guys made me learn another languege
what
so i need opinions and help
so im making a mass-nick command (haha yes)
and
should it be
message.guild.members.forEach(h => {
h.setNickname(args.join(" "))
});
or
message.guild.members.setNickname(args.join(" "))
members is a map (pretty sure) so the second wouldnt work
cool
@earnest phoenix neither works, you'd need to either turn it into an array/iterable, then loop it, or use some sort of ugly method through .filter or something
why do you need to filter it
what can I use firebase for
wat
When it comes to making a bot?
it's already a map which has foreach
don't map it to an array for the love of god
it works
i didn't need to turn it into an array

thx tom
but wait
i fixed my problem
its .atag:hover::after
cool
yes
cool
ok
wait I am using a server count example
const DiscordBots = new DiscordBotsList('token');
const shardID = '';
const shardCount = '';
const serverCount = '';
const id = '';
DiscordBots.postStatsWithShards(shardID, shardCount, serverCount, id);
// Without Sharding
const servercount = ''; // Replace '' with your guild count.
DiscordBots.postStats(servercount); ```
do I put my bot's token in 'token'?
why not use the official api
so it wouldn't work anyways
it has to be online during testing at least
Its needs to be on while they test it
ok
the mods need to review it and stuff
ok
and deny it a load
I haven't hosted my bot that was why I was asking
ok
The only thing I hate is the description
wait do I need a website and a github URL?
the detailed one sucks
😅
guys i need a 300 word essay by tomorrow im screwed 
have fun xD
@earnest phoenix lol, what's this have to do with development
somebody said the 300 word long description was hard
havent u heard the "i have a <small number> word essay due tomorrow oh no!" meme?
does anyone know any good ways to host a bot
vps
Or buy a RaspberryPI 
I'm actually hosting one of my bots on a RaspberryPI ... xD
meme
anyone has experience with nano-sql?
im looking for a minimalistic database for a node api
btw which RasberryPI would you recommend
the newest
Can't recommend an rpi for a growing discord bot
if it's a few servers, then maybe..
My Bot isn't growing THAT fast... So, i use it as long as i can.
CPUs, though in those RPI. very weak
yep
How can i make the bot deafen itself when they joining voice channel?
i use discord.js and js
yeah course js
Missing Permission, i think they no need that perms to deafen itself
what was the code you put down
First i eval it to join voice channel
then eval use msg.guild.member(client.user).setDeaf(true)
@earnest phoenix
no
message.guild.me.setDeaf(true)
@earnest phoenix
still same Missing Permission @earnest phoenix
check to see if it can even deafen itself
so
how do I code w discord.py
...
thats idle
o
look
I dont no ANYTHING
about coding
trying to learn how to code a discord bot
learn how to code in python
that gives arole
Go to file
Then click on New File
@earnest phoenix
done
i mean
You can use that as your IDE now
i could make you one tbh
YES
THANK YOU
ffs
wait so @earnest phoenix what do I type in her eLOL
In her?
python code
I didn't know that IDEs have sexes
same
in here *
smh
also what are you making a bot about?
First he/she needs to use pip to install discord.py
Open up the command prompt and type in
pip install -U git+https://github.com/Rapptz/discord.py@rewrite#egg=discord.py[voice]
You also need to install git to install discord.py rewrite
Just search git download
h
i saw that
it says launch git bash
now what
@earnest phoenix
Send a pic
Launch git bash
done
Now close the window
now wut
Then open up the command prompt
yea
Windows Key + R
cmd
ye
Then copy and paste pip install -U git+https://github.com/Rapptz/discord.py@rewrite#egg=discord.py[voice]
]
ah
Type in py instead
now wut
What does it show?
Good
Type in exit()
oh
it reset
lit
Now copy and paste py -m pip install -U git+https://github.com/Rapptz/discord.py@rewrite#egg=discord.py[voice]
WOAH
WT
F
IS IT DOING
TO MY COMUPTE
WTF
ummmm..........
lol
Does it say, "Collecting discord.py"?
WHADHU HECK IS THAT
Yes
That's good
bet
That means it installed everything needed to use discord.py correctly
OH LIT
When it says collecting and downloading, it's installing
now wut
Now open up IDLE
python?
yes
k
done
ok
Now import discord.py
@quartz kindle heck off
I like him
hes acctually doing it better than the video
but are you actually learning anything from it?
will you remember and understand all of this?
no but I can set it upthough
i just needed help to set up
and download
import discord
from discord.ext import commands
from discord.ext.commands import Bot
Add that to import the module
wait
do I copy paste all of it
Sure
and then just paste it in?
Yep
Send a pic
oh
How could I make my bot's status have all of the guilds it is in?
discord.js
if (message.channel.id !== '501572986558480386') return;
if(message.content.startsWith(args.join(" ") !== "--verify")) {
message.delete();
await message.author.send("Please Use ``--Verify`` to verify yourself in The Server! Channel: [#501572986558480386](/guild/264445053596991498/channel/501572986558480386/) ")
}
would this work for me?
whaddhu frick
what is that
discord.js?
OH
I see
ye, u see
xd
so, would it
oh
@earnest phoenix I dont know what the heck code is
I don't know discord.js
but is that a simple verify commands
where it asks the person to --verify
no, the verify command is different
to verify them?
that looks weird @earnest phoenix
^
this is just to make sure, they dont spam any other message
and they can only send that message to the channel
if(message.content.startsWith(args.join(" ") !== "--verify"))
args.join(" ") !== "--verify" will return true or false
therefore you're checking if a message starts with true or false
so if (message.content == (args.join(" ") !== "--verify"))
How can you make your bot stay online for ever?
you need a computer or a device always on, or a vps @amber junco
?
that doesnt run on ur ocmputer
Ohhhh
that is what most people use
anyways @earnest phoenix can u help me out
so if (message.content == (args.join(" ") !== "--verify")) would that work instead
Why is my name hoisted?
I mean hoister?
@earnest phoenix you're still comparing a message to true or false
It's getting late
last one
do I click enter
or just leave it there
Go to File > New File
why wont this work annyways
if (client.guild.id !== '497153287779516417') return;
client.on("guildMemberAdd", function(member) {
let role = member.guild.roles.find("name", "ToBeVerified");
member.addRole(role).catch(console.error);
});
Then paste
how do I make a config javascript file?
Then you imported discord.py and you're ready to start programming!
I am confused on it
uuuuuuuuuuuO lit
I mean hoister?
@earnest phoenix that if outside the client.on is not doing anything
@quartz kindle how did you learn to code discord bots
Lmao
i've been working with web development for many years
so i already knew javascript when i started doing bots
client.on("guildMemberAdd", function(member) {
if (client.guild.id !== '497153287779516417') return;
let role = member.guild.roles.find("name", "ToBeVerified");
member.addRole(role).catch(console.error);
});
this
do u know any good ways to code bots
yes
type some words, and make them work
xd
BET
@earnest phoenix what exactly are you trying to do? that IF makes no sense
autorole, but only on one server
then it should be member.guild.id not client.guild.id
you're checking the guild of the member that joined
is that how u code D:
idk how
im just looking off what your doing
.
and tryina do my own thing
😦
You know a great place to learn?
where
Neuro you should really look into learning a programming language, if you're really interested in learning how to code
if you learn a programming language, you can do anything with it, including discord bots
depends on how smart you are and how hard you work
it can take weeks, months or years
if(message) (message.channel.id !== '501572986558480386') return;
^^^^^^
SyntaxError: Unexpected token return
that IF is wrong
if you cant do if() ()
its if() {}
besides your condition is also wrong
if(message) === check if message exists
yup, my other problem is the stoopid thing was not in a message event
oh
yeawell ofc
its easy for you
if I had learned js back in minecraft days
then it woulda been easy as heck
js = javascript
its a different language
techincally, javascript's real name is ECMAScript
but it was popularized as javascript
it has nothing to do with Java
JavaScript's naming was just for publicity
Java is a compiled language, similar to the C languages, its much more complex and low level
javascript is a high level interpreted language, its much easier to use, but it needs to run inside an interpreter program
web browsers have built in javascript interpreters, which makes javascript extremely popular for websites and web apps
so if you're interested in web development and learning how to work with websites, javascript is a must
too much tech talk
im just lookin to code using python
client.on("message", async(client, message, args) => {
if (message.channel.type === "dm") {
if (message.author.bot) return;
message.react("❌")
message.author.send("You Cannot Use Commands In DM!")
return;
}
(node:14060) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'channel' of undefined
i may not be good, but i know that message is defined here
Codecademy is one of the best sites out there
someone can agree that that should work ^^^^^
bruh
how long is this gonna take
how long 4 what
@earnest phoenix it is not defined
you defined it wrong maybe
client.on message only returns one parameter which is message
but you have 3 parameters there
try a space after async
means the message is defined as client
else it thinks its a function
it has worked before
async()
now it wont
space will not really work on that I think
show the wole code and is that module.exports
Im pretty sure that message is defined as client there
👀
unless you did other things on your code
but I doubt you use event handler
do you really need async there anyways?
@quartz kindle
do i need to use pthon 3
well, i do need to define mesage dont i
or 2
and args
for coding discord bots
and shit
depends
wym depends
remove that client, message and args
a discord bot is coded using a "discord library", which is a package containing a shit ton of code to make python work with discord
so depending on which discord library you use, it may require python 2 or python 3
just hastebin it
hence why better learn coding first
there are a lot of things involved in programming besides coding
i just need to make a simple discord bot 😭
environment, dependencies, and even linux in general are extremely useful things to know
first of all, why do you want a bot
if there are already a lot of bot
because no one can code one for me
and I need one spesified for my server
and ive been here for the past 3 hrs
you wont code a bot in 3 hours anyways
my bot took months to reach a state where is usable, useful and stable
ok first of all
fyi thats not simple to code
it shoudnt be like that
it doesnt work like you expected it to work
you have 2 message listeners
which is why?
@untold pulsar uses a single listener for all her functions
you dont do 2 client.on message
SHOW ME BOoth
show me a snip of it
thats why Im pointing out your music should be rewroted
it is causing errors because
you ask your help then you point your own view
you dont code a bot and refuse to improve it
@quartz kindle
@earnest phoenix here's whats involved into reaction roles:
- bot receives command
- bot sends list of roles
- bot reacts to own message
- bot starts listening to reactions on its message
- bot receives reaction update
- bot checks which reaction was used
- bot checks who used reaction
- bot assigns role
all of that with extra checks in the middle for checking if both bot and user have all the requires permissions, plus extra checks for error handling
oh
Im saying The music is irrelevant
wut
all i want to fix is the other error for now
it is relevant because the that code contains the music
then when the bot grows, ill clean up all the code
client.on(eventName, (...args) => eventFunc.run(client, ...args));
you got this
then
client.on("message", async(client, message, args) => {
@earnest phoenix here's whats involved into reaction roles:
- bot receives command
- bot sends list of roles
- bot reacts to own message
- bot starts listening to reactions on its message
- bot receives reaction update
- bot checks which reaction was used
- bot checks who used reaction
- bot assigns role
all of that with extra checks in the middle for checking if b
you have this
it shouldnt be that hard right
@earnest phoenix and no
I worked for reaction stuff commands for a day
leearning await reactions
ffs
if you want a bot that does that you need to pay a dev
its not hard if you know what you're doing. if you dont, then it is hard
@sinful lotus i was ready to pay
and then a mod said dont advertie your shit in here
thats a handler
and i deleted it
@earnest phoenix thats the point
its a handler
why not put the music code Inside the handler?
why create a separate client.on message
that still wont fix my problem
it will
@quartz kindle soooo, how do I find out a bots cod
code
how do I look at it
like as a refereance
Watch me do it, BET U IT WONT FIX
I coded for 8 months and I know what and donts
there are many open source bots in github for example
I experienced a lot of bugs more than you do
but i wouldnt advise looking at them, since their code can be quite complex and just leave you more confused
you can try some tutorials
for example i just googled "discord bot example python"
and i got this
import discord
TOKEN = 'XXXXXXXXXX'
client = discord.Client()
@client.event
async def on_message(message):
# we do not want the bot to reply to itself
if message.author == client.user:
return
if message.content.startswith('!hello'):
msg = 'Hello {0.author.mention}'.format(message)
await client.send_message(message.channel, msg)
@client.event
async def on_ready():
print('Logged in as')
print(client.user.name)
print(client.user.id)
print('------')
client.run(TOKEN)```
once again. i need it to havemy own name and profile picture
thats why i wanna code my ownw
:v
but i guess I have to go through 10 thousand years of learning code
good luck with that
thats an example of a python bot that responds to "!hello"
and then study at harvad
and then get my ass wooped by a teacher
there
comeback here askin what is a command for a bot
OH
@quartz kindle
thanks
for sending that
PROVEN WRONG
still have error
just use another bot tbh @earnest phoenix saves you time
so does it reply with something
@earnest phoenix did you eveen code it right?
how?
this is the command logic: if message.content.startswith('!hello'): msg = 'Hello {0.author.mention}'.format(message) await client.send_message(message.channel, msg)
if message content starts with !hello
message equals "hello author"
send message
wait so if I have to do a commands
https://github.com/Deivu/Kongou @earnest phoenix you know what, thiss is coded on the same logic of your music bot
but it never errored
client.on("message", async(client, message, args) => {
if (message.channel.type === "dm") {
if (message.author.bot) return;
message.react("❌")
message.author.send("You Cannot Use Commands In DM!")
return;
}
this is all i asked for help with, so dont be saying my music feature is f***** up becaus eits not
btw how do you get that black box
so it IS your problem
and the colored words whadhu
like this ``` code here ```
if you are pursuing that code
THe music thing is in a completely different file!
I already told you wtf to do
client.on("message", async(client, message, args) => { just remove this all and put async (message)
from discord.ext import commands
from discord.ext.commands import Bot
# Work with Python 3.6
import discord
TOKEN = 'XXXXXXXXXX'
client = discord.Client()
@client.event
async def on_message(message):
# we do not want the bot to reply to itself
if message.author == client.user:
return
if message.content.startswith('!hello'):
msg = 'Hello {0.author.mention}'.format(message)
await client.send_message(message.channel, msg)
@client.event
async def on_ready():
print('Logged in as')
print(client.user.name)
print(client.user.id)
print('------')
client.run(TOKEN)
```]
OSOOAS
you are just d oing it wrong
purfect
msg = 'Hello {0.author.mention}'.format(message)
await client.send_message(message.channel, msg)```
do I have to indent?
you have to understand what is happening in the code and what is the process that the bot is following, aka, the code flow. else you wont understand shit and just get confused
this is why you dont code with little js knowledge
so for example
indent is important for python yes
the discord library will listen to ALL messages received by ALL servers the bot is in
ALL of them
and your code will filter ALL the messages
ReferenceError: async is not defined
oh
ReferenceError: async is not definedReferenceError: async is not defined
until it finds a match
your fix doesnt help me
are you meme or wth?
@topaz fjord another use for the bot 
so whats the difference with ' ' and " "
everything in coding is manually specified and defined, you have to tell your bot EVERYTHING you want it to do, every single step literally
client.on("message", async(client, message, args) => {
TO
client.on("message", async(message) => {
what Im telling you to do is
learn js for petes sake
thats the exact same thing
Just do it
what fucking difference would that make
double quotes 
I HAD TRIED THAT ALREADY
and i need args
nop
var args = message.content.substring(prefix.length).split(" ");
^ its inside your code
so why the hell put args there
something not defined
didnt
wrong parameters in events
dbl dev 
guess what
i did what u said
(node:8828) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'channel' of undefined
no change in error whatso ever
are you sure its in that code
YES
its right under it
say hi for example, I have to be like. Think the word high, form the letters in your head, make sure your mouth knows the letters, then form letters into words, make sure you know how to say the words, then say the words
literally 1 line under
removee the client
thats my problem
jsut leave message there
the client being removed, will do no diference to error
try it first and make sure you save it
first of all client isnt even used therwe
its not even highlighted
whats this, removed client
(node:17168) UnhandledPromiseRejectionWarning: ReferenceError: async is not defined
put space
exports.run = async (client, msg) => {
not
exports.run = async(client, msg) => {
^ said that ages ago lul
(node:8924) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'join' of undefined
if (message.content == (args.join(" ") !== "--verify") ) {
if (message.channel.id !== '501572986558480386') return;
message.delete();
message.author.send("Please Use ``--Verify`` to verify yourself in The Server! Channel: [#501572986558480386](/guild/264445053596991498/channel/501572986558480386/) ")
}
already asked
no reply
then wait for reply
put the ```js
client.on("message", async(client, message, args) => {
var args = message.content.substring(prefix.length).split(" ") // TO HERE
if (message.channel.type === "dm") {
if (message.author.bot) return;
message.react("❌")
message.author.send("You Cannot Use Commands In DM!")
return;
}
if (message.content == async(args)(args.join(" ") !== "--verify") ) {
if (message.channel.id !== '501572986558480386') return;
message.delete();
message.author.send("Please Use ``--Verify`` to verify yourself in The Server! Channel: [#501572986558480386](/guild/264445053596991498/channel/501572986558480386/) ")
}
var args = message.content.substring(prefix.length).split(" "); // THIS LINE
pls define variables properly
faceplam overlord
@sinful lotus do u know a bot that gives roles based on the emoji they react to>
I was not this dumb when I started js
i like froot lopes
trying to join args when they dont exist, trying to compare a message to a boolean, comparing an array joined by spaces to a single string
OOH
I'd rather stop helping this guy



