#development
1 messages ยท Page 821 of 1
ws? (and btw this wont loop every second, just for testing rn)
o
And that doesn't matter that will loop through each guild
tru
cuz i can use bot.guilds once i run await bot.fetch_guilds once right?
That means hundreds if not thousands of calls
And I mean why don't you just use bot guilds anyway instead of fetching it
didnt realize it fetched automatically
but that doesnt explain the role being None
It returns none if it can't find that role
Either the id it's getting isn't valid for that guild object
but its the valid id for the role tho?
I say either but that's the only thing
im really confused
cuz
@commands.command()
@commands.check_any(
commands.has_permissions(manage_roles=True, manage_guild=True),
commands.is_owner(),
commands.has_permissions(administrator=True)
)
async def setstreamrole(self, ctx: commands.Context, role: discord.Role):
cfg: cogs.confighandler.ConfigHandler = self.bot.cfg
cfg.data[ctx.guild.id]["streamer-role"] = role.id
cfg.save()
await ctx.send(embed=discord.Embed(title="Role set", description=f"Streamer role set to {role.mention}"))
@commands.command()
async def getstreamrole(self, ctx: commands.Context):
cfg: cogs.confighandler.ConfigHandler = self.bot.cfg
role = cfg.data[ctx.guild.id]["streamer-role"]
await ctx.send(embed=discord.Embed(title="Role set", description=f"Streamer role is set to <@&{role}>"))
it sets (yaml data)[guild id]["streamer-role"] so i dont see why it wouldnt be valid
ok so
i put in a print g.roles and it gives nothing
but print await g.fetch_roles() works
so i'm assuming g.roles just isnt populating?
c o n f u s i o n
ยฏ\_(ใ)_/ยฏ
you said you dont know dpy.
im waiting on cf8 , or anyone else who does ;p
sighs the documentation leads me nowhere
what.
sigh
????
nevermind
o..k
So I am currently getting this error:
So my bot's Shard isnt working? and how would I fix this, would I need to switch host if thats could be the issue?
Who else is experiencing an API shortage in discord.py?
lib?
@regal saddle ?
does anyone else know dpy that can help xD
https://ptb.discordapp.com/channels/264445053596991498/272764566411149314/688158929179508750 with this and up, @ me if you can ;p
library
sighs
@regal saddle what. library. people cant help unless they know that
already fixed it by myself.
oki
and if thats djs this may help https://discordjs.guide/additional-info/changes-in-v12.html
its messageReactionRemoveAll
ye
๐
see idk why they use that versioning scheme
okbut
like
i dont use djs ;p but i mean
with d.py
v0.x.x was mostly backwards compatible
i learned py and js...
bruh moment
i mean im just saying djs versioning makes no sense
gn :3
major.minor.patch
major - can break your code
minor - shouldn't, adds stuff.
patch - fixes a bug
yea but i doubt v10-v11 djs was breaking
and so on
no library has THAT many breaking changes
I mean, discord.js can't make up their minds on what to name a method and how it does the same task (looking at you cache) so it probably does.
xD
when you could message.guild.members.has() but now it's message.guild.members.cache.someOtherBullshit()
why bot is offline on dbm my bot is enabled on run script and mu bot is offline
And when I turn it on it is online short
What
my offline bot, despite the fact that it is online when we use the command eg! work, it suddenly becomes offline
on dbm
can someone help me
solution: donโt use dbm
What's dbm?
discord bot maker ๐คฎ
Ah
@earnest phoenix check token
can you use svg images in an embed thumbnail? (ping me when you reply)
@steel cloak wait wdym by svg?
like the image format, at least i believe its an image format
Hmm lemme check that if it's possible real quick
@steel cloak which discord bot wrapper are you using?
JDA
Hmm... Sorry idk about that one... (I mean how's it's done...)
i mean i believe its all alike when it comes down to discord
But there's some noticable differences tho...
Have you checked some docs of that bot wrapper to check how is it possible or is it even possible?
it just mentions that .setThumbnail takes in a string in URL format lol
imma test more stuff and look around more. thanks for the help!
Np but you can set the thumbnail to the image you want with a link(just set the image as your pfp and use a bot that shows the URL of your avatar... Copy the link) and now paste it inside the .setThumbnail('URL')
If the svg format doesn't work... Change the image format to webp or png or jpng... That might work @steel cloak
oh yeah im aware of that. only thing is im using an API that returns images only in svg format and was just wondering if there was an easier way then having to convert them to png
You can convert the image format to anything you want with a online image format changer website or with a functional app...
This is a better and easier way
hi
can someone help me make an eris command handler
Use the library @wide ruin
it still says na
then u dont do it right
class TopGG(commands.Cog):
"""Handles interactions with the top.gg API"""
def __init__(self, bot):
self.bot = bot
self.token = token[1] # set this to your DBL token
self.dblpy = dbl.DBLClient(self.bot, self.token, autopost=True) # Autopost will post your guild count every 30 minutes
async def on_guild_post():
print("Server count posted successfully")
def setup(bot):
bot.add_cog(TopGG(bot))```
did you put your api token and did you put that as your cog??
nope
make self.token = "ur api token on TOP.GG"
Did u define dbl?
import dbl
its been more than 2 mins
have you tried manually making a request to the api
via postman or curl or something
no
well try it
import discord
from discord.ext import commands
class TopGG(commands.Cog):
"""Handles interactions with the top.gg API"""
def __init__(self, bot):
self.bot = bot
self.token = 'dbl_token' # set this to your DBL token
self.dblpy = dbl.DBLClient(self.bot, self.token, autopost=True) # Autopost will post your guild count every 30 minutes
async def on_guild_post():
print("Server count posted successfully")
def setup(bot):
bot.add_cog(TopGG(bot))```
Do as the examples says
Try that
Instead of putting token[1]
Put the actual token
... so I'm looking into migrating to discord.js v12 but I'm confused about how to communicate between shards & master process:
what
In your code
yeah
Instead of token[1] directly put the token
but i cant share the token
........ But your not sharing the token
i would be
Oh dam
because its directly in main
Did u mention the path to the token
Hmmmm
@tight plinth do u know how to fix that
You're most likely not sending your token right
the bot is logging in
Ok if anyone has moved to discord.js v12 I seriously need some help understanding this. How the hell are you supposed to receive and respond to messages on a master process now?
They removed the message event from the manager and moved it to the Shard class, that's nice and all but the master process doesn't have a shard right? process.on('message') doesn't work and even if it did I still need to be able to reply to the specific shard who messaged me.
Except I know I should be able to do this because the ShardClientUtil class still has a send method that says "Sends a message to the master process.". Ok cool but how do I receive it? 
Ik 12v is so confusing
try manager.on("message")
That's the old event
I am staying on 11v of now
it does not work now
ah, it should be shard.on("message")
the shard returned by spawn
@earnest phoenix i printed the token list
spawn returns a shard instance
And that shard acts as the master shard, is that right?
spawn returns a collection of shards
createShard returns a shard
so each shard has its own message events
Wait ok, hang on a sec, i understand that but that's just to handle messages sent to shards
also to receive
But how about the messages sent to the master process using ShardClientUtil.send ?
There's no shard to receive those
OH I got it
Ok so the shard.on message is a handler for the message sent by the shard
Sorry took me a while
manager.spawn().then(shards => {
shards.forEach(shard => {
shard.on("message", message => {
console.log(message)
})
})
})```
Yes I got you, my bad I totally misunderstood the meaning of that
I thought shard.on(message) would define what code would run on the shard upon receiving a message
But it's just moving the manager's handler to the shard object
@wide ruin try regenerating the dbl token
ok
That did it! Thanks @quartz kindle sorry for misunderstanding that change log really could have been more clear lol
v12 appears to be functional on my end yay
๐
i found it nvm
@quartz kindle did you at some point write djs light in v11
like
nvm that doesnt make sense
im stupif
nope
i tried looking into the v11 code, but a lot of it didnt make much sense
so i cba trying to find how its caching works
eris gang
So I even switched host and changed some code but why am I still getting this error: "(node:9644) UnhandledPromiseRejectionWarning: Error: Shard 2's Client took too long to become ready."
is your code trying to load something that takes a long time?
or your code might be trying to load something that cannot be accessed while in use by another shard
My command handler could where its loading all the commands ๐คทโโ๏ธ
that is like the only thing that would take awhile
and somehow its now working
without me doing anything
I jinxed myself
Hey guys! So basically I want the user to enter a command: !predic <sex> <age>
But how can I find the age and the sex in an input?
In python
i mean its basics python :shurg:
Yeah I don't code a lot

how can i make a channel only accept 1 specific command?
like no chatting no other commands only 1 specific command all other messages get deleted
define which channel that applies to: if(message.channel.id === "some id")
then check if the messages start with the command
````if(message.content.startsWith("yourcommand"))```
else delete the message
What version
https://discord.js.org/#/docs/main/11.4.2/class/Guild?scrollTo=createChannel give it the type category
you have to recategorize all the channels
ofc it won't
this isnt sending the guild amount to dbl correctly
it's kinda obvious
setParent doesnt exist in 11.4.2
the token was printed right, but it still saus n/a
@amber fractal wtf
I was on guild
production = False
try:
open("devmode", "r").close()
except FileNotFoundError:
production = True``` waht the fuck is that
@modest maple it checks if devmode is on
Why dont you have that in some config
@earnest phoenix I already told you
why do you have that as a fucking file?
we have a devbot as well
like a json config
i didnt do it, no clue
TextChannel#setParent() @earnest phoenix
its just because we have 2 devs and its ignored on a git push
so he always has the dev code, i always have current code
because i dont have the dev file
Could make 2 branches
i dont see anywhere where youve called dbl
he overwrote it shit
so so so much of that code is bad
no offense
but holy fuck
sort out how you two are working on this
because rn its messy as shit
yeah
class TopGG(commands.Cog):
"""Handles interactions with the top.gg API"""
def __init__(self, bot):
self.bot = bot
self.token = token[1] # set this to your DBL token
self.dblpy = dbl.DBLClient(self.bot, self.token, autopost=True) # Autopost will post your guild count every 30 minutes
async def on_guild_post():
print("Server count posted successfully")
def setup(bot):
bot.add_cog(TopGG(bot))```
does that print anything if its successful or not?
I smell dblpy
you have a file to indicate being devmode of not, instead of just being a var
you get the token twice and only use the first one
you load tokens into a list using a one liner for loop even tho its only one line and just readlines(1) would work
you use context managers for everything other than what could actually benefit from it like open
your indentation in some places is 2 spaces others its 4
you override so much
Have you read the docs
Oh I thought you were yelling at someone else
in no part of your code do you even call dbl
nor do you even set it up
sigh
but the devmode file is .gitignored, so when i push, he still uses dev code
so much is wrong
- Dont override your tokens
- Get better varbile names
- use context managers correctly
- dont use a fucking file as a var
- dont randomly slap in a class and remove self
- dont put a class randomly in some code and hope it works
- learn pep 8 please god
- actually put classes and functions where they want to be to work with varbles etc not randomly in what ever code to make it work
im going through your list rn
thank you for comming to my ted talk
Guide
^
fuck
you saw nothing
file = open('dbltoken.txt', 'r')
bot.dbltoken = file.readlines(1)
file.close()```
@modest maple
is that better?
no
how should it be?

you also must know what token is on which line
and what thing is what
๐ learn ๐ the ๐ basics ๐
I'm not even a python dev
json is good for configuration
now im gonna go yeet myself off the edge of a cliff
im not even the one who did that section so dont blame me
either work
@wide ruin so discuss it with ur other dev
and tell him to fucking learn pep 8 and basics
ok
cuz you and him seem to have a major lack in communication
@earnest phoenix show the error
and show your code
I mean
it's the same logic
like not the samd but you get my point
show the error you're getting
alright
like
```js
code here
@earnest phoenix
that's a very inneficient way of doing it
you could have each channel name in an array
then loop through them and then create each channel
let names = ["name 1", "name 2", "name 3"];
for (let i = 0; i < names.length; i++) {
server.createChannel(names[i], "text").then(c => c.setParent(/*ya know what to do*/));
}
like so
well
docs exist for that very reason
yes
there
learn how to keyword search
message.channel.send(message.author.avatarURL)
What can I use for send an avatar when you use: !avatar Alessandroโก#7960
use regex to extract the username and discriminator from your argument and then search a user with the exact username and discriminator in your client cache
and no, i may not give you any code
yes
what about it
a mention doesn't exist there
I thought he said mention at 1st
@finite bough search by username is just args.join(' ')

tru
an inefficient but a functional lookup would be to map all members to a string in username#discriminator format and then find a match based on the input string
.split('#')
names can have #
i'm pretty sure you can have hashtags in usernames
Ah
yeah
Well
no
you can't have #
I just tried
it won't let me
so .split('#'); should do it
let discriminator = args.split('#')
discrinimator[discriminator.length-1]
Or something like thag
dm me if you can help me running my bot
lumap
split should do it then
discriminator[0]
well, you can always fetch the member from discord. it allows for string searches
it doesn't
When I make API for my bot communication with DB, will I get big win of performance or not?
@elder moss just ask in here
it says that i havent installed discord through cmd prompt when i have
@copper cradle usernames with #
@zenith terrace ^^
since when it doesnt?
why the fuck would you do Array[Array.length-1]
you can only fetch members via ids, anything else is a cache lookup
i did
library?
usernames ๐ can't ๐ have ๐ #
I use discord.py and when I make API, Django
Who uses Pycharm (text editor)
Integrate your service with Discord โ whether it's a bot or a game or whatever your wildest imagination can come up with.
Thanks
you can request guild members by name
ยฏ_(ใ)_/ยฏ
tim comes in like Hitler
query? string string that username starts with, or an empty string to return all members
im intrigued, hm i wonder how far you can go with that
cry: read the docs
also cry: where the fuck does it say that
no
Oof
multiple users with same name
Use user id
basically a mention
Works too
@quartz kindle i don't think that's the gateway opcode
that might be a REST request
it is
ye
you can also get presences with this
instead of using presence packets
but you need the presences priviledged intent
Dont question or try to correct the Tim. He knows all
i wonder how far you can push it
๐
wdym how far?
no one is perfect
max is 100 members if you dont have priviledged members intent
how many requests you can do before you get ratelimited/get kicked off the websocket
this is not #memes-and-media
that's IDENTIFY i think, not sure
ah
i downloaded the discord py through command prompt
and it still doesnt work when i import it
someone please help
read guides
?
what do you mean by "it doesn't work"?
does it throw an error, etc.
please give details
p.s. he reset the token
thats the problem
dont you need to install it in your project?
you installed it in a different folder
Adding packages, deleting packages, upgrading packages, pip, devpi
create the category first, then create the channels using the category as parent in the channel options
by reading the docs
also, you cant do so many async operations at once
you need to use an async function and properly await each request
else you will get rate limited
whats your current code?
use code blocks
``` code here ```
first remove the require("discord.js"), you're not using it anywhere
then make everything an async function: exports.run = async function(...)
._.
python dev should know that too
a
export run has nothing to do with DC bots
lmao
then, you cannot delete channels like that, if you have 50 channels, your bot will try to delete them all at once, which will send 50 requests to discord at once, and will get you rate limited
you have to use a regular loop, and await each request
for(let channel of message.guild.channels) {
await channel.delete()
}```
tim: stfu I am trying to help this guy and u r ruining the fun
lmao
ยฏ_(ใ)_/ยฏ
@earnest phoenix that has nothing to do with making dc bots lmao
python also has async/await
and it's the same logic

oof wrong channel
worst case you can time the delete()
Thanks guys its working and running my bot is
๐ค
desu timing it is better than smashing all the requesting up together and shoving it up discord
Yeah, thatโs why I recommended, in worst case he canโt wrap his head around async/await he can time it
I think
timing is harder
than just putting all the stuff inside a async function and writing like 100 await
lmao
na ez
How come channels become uncached when they no longer exist (aka bot left server) but users remain cached even if the bot has no common servers with them
(discord.js if that's relevant)
ยฏ_(ใ)_/ยฏ
i guess channels may get deleted/changed when the bot rejoins, while users will most likely still exists, except for maybe a username change
so channels would need to be fetched again regardless, while users not
The user I'm testing with is an alt that is only in one server and when I kick the bot from that server it can't get the channel name but it can still get the alt's tag
also, not sure about this one, but can users still dm the bot if they have no servers in common?
no
Nah clyde goes sicko
lmao
I store channel, guild and user ID's in a db when a certain command is run but I want to delete them when the user isn't accessible, and yet it stays cached until I reboot
I don't want to have to reboot every 10 seconds that's boring
lmao
well, just remove it from the cache yourself
lul
v11 or v12?
v11 at the moment
hack the lib 
client.users.delete(id)
Oh right thanks
But how is the bot gonna know whether to delete from the cache if it doesn't know if the user is actually accessible or not
you mean how will it know if the user left all common servers?
Yeah
you'd need to try fetching it i guess
And then catch?
although i think you can still fetch users that dont share servers
let me test real quick
Oh okay thanks
welp i can still fetch them
Bruh
there doesnt seem to be a noticeable difference between a user who shares and doesnt shares servers with the bot
tho
unless the users i tested are actually in servers with my bot that i dont know about
lmao
hmmm
Does fetchUser check cache or send a http request?
@buoyant smelt
dm this bot
nvm
can ya like invite me to a server with a bot which is not here
it checks cache and then sends it if not cached
and then I will leave and try to msg it
the bot doesnt think, it checks lol
They are going to take over
anyway, i cant think about a reliable way to check when a user becomes unavailable to the bot
besides trying to fetch it in all guilds to see if hes still present in some of them
Maybe I'll just have to pretend that everything is fine but then use catch blocks on stuff
if you can, just leave it in your database, thats what i do
you can implement some sort of "last seen" field in your database
and delete it if he hasnt been seen for like 1 month or a year
Nah I think I'm just gonna have to catch stuff
wdym?
It attempts to send a message to a channel (whose id is in db) and mention a user (whose id is in the db) but if it can't find that user and or channel then I just catch that and delete it from db
user.send("test")
.catch(()=>{
//delete from db
})
Like this
how can i reverse a collection
Put it in the opposite order you mean?
yup
well tim
ig you could use sort
if I leave this server and try to msg u after 1 second
pretty sure it will not work
so either try leaving ur bot server and msging ur bot
or ask someone else to join and leave and msg
thats pretty reliable I think
but the idea is have the bot detect it, not the user
ah you mean to test if you can still dm the bot with no shared servers?
@true ravine if you're using an unmodified discord.js channels are always cached
so you can do js if(client.channels.get(id from db)) { ....send() }
yea
and in the send you can simply type <@user id from db>
What about guilds?
Hmmm
When I kick the bot from the server and do bot.guilds.get(id of server i just kicked it from) it can't find it
Which is what I want
But I want the user to behave the same way
you cant have the user behave the same way
but you dont need it to
you can mention users even if they are not available
That's not the only thing it does with the ids, it was just an example
it will show the mention to people who have the user available, and just show <239847283740825> to those who dont
Yeah I know that
then what is it?
then yeah, dm them and catch it
a*
a*
an
why?
u use an infront of words starting with a,e,i,o,u
yes
xD
mee too
We pronounce user as "utilisateur" in french
._.
french is very interesting but too bad this is for development only ._.
Oof
is canadian french similar to french-french?
related to development 100% no sarcasm^
yeah fuck it
xD
nobody needs help anyway
XDD
same
pro tip
I type something, it crashes
just use dots after every word
like.this.and.u.will.get.the.hang.of.it.in.no.time.lmao();
my . switch is broken because of that
Does.this.will.work
i need to change them constantly
add ();
$(".Xignotic").text() == "Stinky" ? "Yes." : "No."
Waa
why jquery lul
Dafuk
also #memes-and-media probs
because i scrape websites a lot
No u tim
Hey! Is there a way to time a message? (Like every hour the bot will send a message?)
I searched on stack overflow but couldn't find anything
Programming language?
Python
generally a bad idea to automatically send messages
but make a coro and a while loop and create a task in a event loop
hourly msgs r usefull
depends
discord no likey them
they could be annoying
Hey! Is there a way to time a message? (Like every hour the bot will send a message?)
@tough relic cronjob
Thanks I will see what cronjob is!
It's a thing designed specially for doing scheduled tasks, it's present in almost all languages as a library
or timeout
What is Crontab
Cron is a software utility that allows us to schedule tasks on Unix-like
systems. The name is derived from the Greek word "Chronos", which means "time".
The tasks in Cron [https://en.wikipedia.org/wiki/Cron] are defined in a
crontab, which is a text file cont...
on js setTimeout(() => function_here, time_in_ms)
on py while true: function & time.sleep(time_in_secs) (you need to import time)
easy
Except that way you'll not run that code precisely each hour
Since everytime you restart the code the timer will go back
yes?
He wants to send a message every hour
bot.users.get("686698479271280640").send
Why does bot.users.get() return undefined? The user ID is me btw.
djs version?
@lyric mountain yes? you can do it that way?
Was that a question or an affirmation?
affirmation
timeout works wonders as delay, but not as precise scheduling of tasks
While cron is the inverse
okay
a
.cache is for v12 not v11
ok
@earnest phoenix make sure you're using the correct client instance and that the client is ready
mhm
and that you defined client as bot
im sure
show code
let me get back on my pc
might take a few more mind
mins
I may have defined a client twice
oops
how ..--..
Don't ask lol
global.Discord = require('discord.js');
global.moment = require('moment');
global.fs = require('fs');
global.ms = require('ms');
global.request = require('request');
global.chalk = require('chalk');
global.bot = new Discord.Client();
global.config = require('./config.json');
global.result = require('./config.json');
global.client = new Discord.Client();
Still get the same error
either use client or bot
bot.on("message", async (message) => {
if (message.channel.type == "dm"){
bot.users.get("686698479271280640").send(`${message.author.username}\n``${message.content}`` `);
const collectorr = client.users.get("686698479271280640").dmChannel.createMessageCollector({ time: 1500000 });
collectorr.on('collect', m => {
message.author.send(`Reply from _:\n**${m}**`);
})
return;
}
I used both
same emitted the same error.
still*
(node:14) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'send' of undefined
at Client.<anonymous> (/home/container/index.js:60:44)
at Client.emit (events.js:210:5)
at MessageCreateHandler.handle (/home/container/node_modules/discord.js/src/client/websocket/packets/handlers/MessageCreate.js:9:34)
at WebSocketPacketManager.handle (/home/container/node_modules/discord.js/src/client/websocket/packets/WebSocketPacketManager.js:105:65)
at WebSocketConnection.onPacket (/home/container/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:333:35)
at WebSocketConnection.onMessage (/home/container/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:296:17)
at WebSocket.onMessage (/home/container/node_modules/ws/lib/event-target.js:120:16)
at WebSocket.emit (events.js:210:5)
at Receiver.receiverOnMessage (/home/container/node_modules/ws/lib/websocket.js:789:20)
at Receiver.emit (events.js:210:5)
(node:14) 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: 1)
(node:14) [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.
@earnest phoenix define a guild and try searching urself from thst guild

global.client.users?
oke
are you going to try it or you just wanted to say ok?
code
Ok
the full one
Full code of my index?
sure
nope
as a file
:/
@earnest phoenix only. ode
help please
(node:4) UnhandledPromiseRejectionWarning: Error: Something took too long to do.
ok stop sending the same thing
if so, please send a snippet of that code
@pale vessel i dont using setTimeout
figures
in bot.js
its heroku
it looks like the promise got rejected
its glitch
What version of Discord.js are you using.
nevermind I see it in the screenshot
1.0.0
nope
.
stop dotposting
11.5.1
on glitch, can you open your console and run curl -I https://discordapp.com/api/v7/gateway and see if it says 200 OK
okay
damn there's 7 versions already
200 OK
@earnest phoenix you cant use two clients
@quartz kindle tim help me pls
unless you want to login twice and keep two bots logged in lol
lmao. bot and client
o
replace everything that uses "bot" to client and remove bot
@toxic jolt show code
in programming, show code is equivalent to show bobs
vagene
don't criticize people
aight
ass
deal with it
all right we'll just leave that there...
Yes
You can make a bot with whatever language you want, there's pretty much one lib for every one.
Okay. Thanks.
but tip: theres no need to use so that low-level language, you can even use python (med/high-level).
good luck dealing with cpp because websockets are ass
I'm assuming everybody is having problems connecting this morning right?
check the api status page and discords twitter
Lol
You can't lol, because....
i t ' s n o t a p r o g r a m m i n g l a n g u a g e
Rofl
it is
it is 
It is
Php != HTML
php and html almost same atleast for me so dont rage
ok..
HTML 5
hold on
there
That's for js lol
if (msg.channel.type=="dm") return msg.channel.send('You can use commands in DM\'s') guys why this isnt working?
<script type="text/javascript" src="discord.11.1.0.min.js"></script> <script type="text/javascript"> const client = new Discord.Client(); client.on('message', msg => { const guildTag = msg.channel.type === 'text' ? `[${msg.guild.name}]` : '[DM]'; const channelTag = msg.channel.type === 'text' ? `[#${msg.channel.name}]` : ''; console.log(`${guildTag}${channelTag} ${msg.author.tag}: ${msg.content}`); }); client.login('some crazy token'); </script>

What is it @restive furnace
html = js
@earnest phoenix error?
@finite bough no
Html = [js, php, css]
yes
you literially said it
I defined an array
Html = [js, php, css]
Usually for that stuff I use message.channel.type != 'text' @earnest phoenix
An array of languages
!= Text
@hoary elm ty i will try now.
Html wraps then all, but isn't a lang at all
Html is the outside of the pepperoni
console.log(html == html) // returns true ```
php is no way near the same as html lol
yes
Lol why is this even an argument
๐๐
@lyric mountain https://google.com/search?q=is+html+coding+lang
@hoary elm same dude.
HTML is markup language
@lyric mountain what if they bought plastic bags xd
Technically,ย HTMLย is aย programming language. In fact,ย HTMLย stands for Hypertext Markupย Language. ... WhileHTMLย and CSS are declarative, mostcodingย is computational - and it's what most otherย codingย languages are designed for.30.4.2019
@earnest phoenix show full code
If it was a programming language then it'd be PL, not HTML
Hypertext Markup Language
html is a programming language
YES!
It is but it's more for Web Browser related stuff
Finally
its a declarative programming language, as opposed to an imperative programming language
```if (message.channel.type !== "text" )return message.channel.send(You cant use commands in DM\'s.)
@earnest phoenix if !message.guild
Lol I can't stand people denying the obvious
@tight plinth that should work too
Oh, true i was forget it :/
It works
I mean only message.channel
@finite bough message.channek always exist
channek
Channel
XD
Fuck my keyboard
XDDD
TypeError: message.channel.permissionsFor is not a function
lol
True
It doesn't exist
Where is that error originating?
Not a function don't exist, so it's not a function
you code on phone + glitch
like rlly
command.code
awful 
If message.author.bot
@restive furnace neither on glitch nor on phone
then why u on phone and on glitch?
Vps is better
REEEEEE
then buy me one
please charge your phone
no access!!!!!!
@sudden geyser bully
@tight plinth buy me one if vps better

