#development
1 messages ยท Page 666 of 1
sounds like you've narrowed it down to finding out why your variable isn't populated
which can be diagnosed
@inner jewel thanks
> const a = []
undefined
> a.concat(1)
[ 1 ]
> a
[]
> const b = a.concat(1)
undefined
> b
[ 1 ]```
if you want to modify it, use push
what is the correct word the definition of a collection of objects?
const objects = { obj1: {... }, obj:2 {... } .... };
the nested objects are "objects" but the definition is also technically "the object"
multidimensional object? nested object? idk
the "correct" term is simply an object
hm
question based off the ethics of playing with 2 objects that share common identities:
ie, a "store object" with properties of price and a "use object" with properties of functional use
if object1[input] exists, then objectA.object2[input].function();
where object1 is locally defined, and objectA is a database object
but [input] being an identically named object
the condition of course being if object1[input] exists, then objectA.object2[input] must exist because they are both defined
So for one of my bots in discord.py 0.16.12 (I would update it but that would require a whole rewrite which I can't do at the moment), when I restart the bot it needs to be able to see when people add reactions to messages that previously existed (as in messages that existed before the restart) even though the deque for client.messages is emptied after every restart afaik. When I tried to append a message to the client.messages deque, some error came up:
File "/usr/local/lib/python3.5/dist-packages/discord/state.py", line 248, in parse_message_update
message = self._get_message(data.get('id'))
File "/usr/local/lib/python3.5/dist-packages/discord/state.py", line 153, in _get_message
return utils.find(lambda m: m.id == msg_id, self.messages)
File "/usr/local/lib/python3.5/dist-packages/discord/utils.py", line 167, in find
if predicate(element):
File "/usr/local/lib/python3.5/dist-packages/discord/state.py", line 153, in <lambda>
return utils.find(lambda m: m.id == msg_id, self.messages)
This is only part of the error, as the whole thing is too big to send in this message, but I can't figure out how to fix this so that I can append messages to client.messages so that the event on_reaction_add(reaction, user) is able to trigger.
Does anyone have any ideas how to fix the error?
@compact mauve you would have to store each message ID into a cache/database
oh
do you know where the message ID would go within the database?
I've tried appending the message ID to the deque also
I have the message object, where I can do message.id to get the ID if I need, plus I have a database to store it in, but I don't see how that'd help. The client.messages thing stores a deque of Messages, not message IDs.
What are webhooks?
?
@wheat carbon Webhooks are a way for one application to communicate with another application
basically
I'm not sure but I doubt it
Ok
You'd probably need an api for that
What's an API?
or some type of capture software integration
Oh
What I basically mean is not really record
Just say minecraft chat in a discord channel
In computer programming, an application programming interface (API) is a set of subroutine definitions, communication protocols, and tools for building software. In general terms, it is a set of clearly defined methods of communication among various components. A good API mak...
oh
Hmm i'm not sure
I used to do it
ooh that's a tricky one
I'm talking about java
You might have to create one yourself
have you considered defining it
no
then do that
Hold on wait I thought I did
Well ummmmm
Guess I'm about to figure out how to
await 'client'.change_presence(game=discord.Game(name='test'))
is that right
Search how to define variables correctly
Ok
Somehow I am not defining this right and I do not know what to do
await 'client'.change_presence(game=discord.Game(name='test'))
I am making a command sor see guild roles, I know If I do guild.roles it send I'd and name, If I want only the name I have to take all roles and take the name of them, I made this:
guild = ctx.guild
roles = await guild.roles()
for guild.role in roles:
role = guild.role.name
``` I think this is wrong and can someone help me pls?
@outer niche client = discord.Client()
So put that in for where the client goes
Or if you need commands client = commands.Bot(command_prefix='your prefix')
@outer niche put it here
import discord
client = discord.Client()
import discord
from discord.ext import commands
import asyncio
bot = commands.Bot(command_prefix='!')
@bot.event
async def on_ready():
await 'client'.change_presence(game=discord.Game(name='test'))
print('the bot is ready!')
print(bot.user.name)
print(bot.user.id)
bot.run
That is what I have
How do you think you can change the client presence if you defined bot?
So I need to go get the client from the application
No!
@outer niche, it's bot, not client, you defined bot
bot.change_presence
import discord
from discord.ext import commands
import asyncio
bot = commands.Bot(command_prefix='!')
@bot.event
async def on_ready():
await bot.change_presence(game=discord.Game(name='test'))
print('the bot is ready!')
print(bot.user.name)
print(bot.user.id)
bot.run()
@outer niche

await bot.change_presence(game=discord.Game(name='test'))
I tried to do roles and not role, but nope https://discordapp.com/channels/264445053596991498/272764566411149314/607051211165925417
@outer niche yes
No.
Ignoring exception in on_ready
Traceback (most recent call last):
File "C:\Users\culan\AppData\Local\Programs\Python\Python37-32\lib\site-packages\discord\client.py", line 270, in _run_event
await coro(*args, **kwargs)
File "C:\Users\culan\Desktop\py\echo.py", line 9, in on_ready
await bot.change_presence(game=discord.Game(name='test'))
TypeError: change_presence() got an unexpected keyword argument 'game'
Yes
Because
It's presence(activity=discord.Game(name='Test')
You didn't put activity
But now it is shooting out a new error message
Send it
Oo
And send the code
Ignoring exception in on_ready
Traceback (most recent call last):
File "C:\Users\culan\AppData\Local\Programs\Python\Python37-32\lib\site-packages\discord\client.py", line 270, in _run_event
await coro(*args, **kwargs)
File "C:\Users\culan\Desktop\py\echo.py", line 9, in on_ready
await bot.change_presence(game=discord.Game(name='test'))
TypeError: change_presence() got an unexpected keyword argument 'game'
import discord
from discord.ext import commands
import asyncio
bot = commands.Bot(command_prefix='!')
@bot.event
async def on_ready():
await bot.change_presence(game=discord.Game(name='test'))
print('the bot is ready!')
print(bot.user.name)
print(bot.user.id)
bot.run

When will my bot be accepted?
It can take up to a week
๐
๐
@fast tundra.command(pass_context = True)
async def warnings(ctx,user:discord.User):
for current_user in report['users']:
if user.name == current_user['name']:
await client.say(f"{user.name} has been reported {len(current_user['reasons'])} times : {','.join(current_user['reasons'])}")
break
else:
await client.say(f"{user.name} has never been reported")
await ctx.send(embed=embed)
This command is not being found
import discord
from discord.ext import commands
import asyncio
bot = commands.Bot(command_prefix='!')
bot.remove_command('help')
@bot.event
async def on_ready():
await bot.change_presence(activity=discord.Game(name='!help'))
print('the bot is ready!')
print(bot.user.name)
print(bot.user.id)
@bot.command(pass_context=True)
async def help(ctx):
author = ctx.message.author
embed = discord.Embed(
colour = discord.Colour.orange()
)
embed.set_author(name='Help')
embed.add_field(name='!help',value='This menu',inline=False)
embed.add_field(name='!support',value='support discord',inline=False)
embed.add_field(name='!ban',value='coming soon',inline=False)
embed.add_field(name='!kick',value='coming soon',inline=False)
embed.add_field(name='!warn',value='coming soon',inline=False)
@bot.command(pass_context = True)
async def warnings(ctx,user:discord.User):
for current_user in report['users']:
if user.name == current_user['name']:
await client.say(f"{user.name} has been reported {len(current_user['reasons'])} times : {','.join(current_user['reasons'])}")
break
else:
await client.say(f"{user.name} has never been reported")
thar
Link is still in chat
Please use codeblocks
idk how to
'''import discord
from discord.ext import commands
import asyncio
bot = commands.Bot(command_prefix='!')
bot.remove_command('help')
@bot.event
async def on_ready():
await bot.change_presence(activity=discord.Game(name='!help'))
print('the bot is ready!')
print(bot.user.name)
print(bot.user.id)
@bot.command(pass_context=True)
async def help(ctx):
author = ctx.message.author
embed = discord.Embed(
colour = discord.Colour.orange()
)
embed.set_author(name='Help')
embed.add_field(name='!help',value='This menu',inline=False)
embed.add_field(name='!support',value='support discord',inline=False)
embed.add_field(name='!ban',value='coming soon',inline=False)
embed.add_field(name='!kick',value='coming soon',inline=False)
embed.add_field(name='!warn',value='coming soon',inline=False)
@bot.command(pass_context=True)
async def support(ctx):
author = ctx.message.author
embed = discord.Embed(
colour = discord.Colour.orange()
)
embed.set_author(name='support discord')
embed.add_field(name='!support',value=,inline=False)
await ctx.send(embed=embed)
@bot.command(pass_context = True)
async def warnings(ctx,user:discord.User):
for current_user in report['users']:
if user.name == current_user['name']:
await client.say(f"{user.name} has been reported {len(current_user['reasons'])} times : {','.join(current_user['reasons'])}")
break
else:
await client.say(f"{user.name} has never been reported")'''
You use '''
watfuck is happening here
\```
from discord.ext import commands
import asyncio
bot = commands.Bot(command_prefix='!')
bot.remove_command('help')
@bot.event
async def on_ready():
await bot.change_presence(activity=discord.Game(name='!help'))
print('the bot is ready!')
print(bot.user.name)
print(bot.user.id)
@bot.command(pass_context=True)
async def help(ctx):
author = ctx.message.author
embed = discord.Embed(
colour = discord.Colour.orange()
)
embed.set_author(name='Help')
embed.add_field(name='!help',value='This menu',inline=False)
embed.add_field(name='!support',value='support discord',inline=False)
embed.add_field(name='!ban',value='coming soon',inline=False)
embed.add_field(name='!kick',value='coming soon',inline=False)
embed.add_field(name='!warn',value='coming soon',inline=False)
@bot.command(pass_context=True)
async def support(ctx):
author = ctx.message.author
embed = discord.Embed(
colour = discord.Colour.orange()
)
embed.set_author(name='support discord')
embed.add_field(name='!support',value=,inline=False)
await ctx.send(embed=embed)
@bot.command(pass_context = True)
async def warnings(ctx,user:discord.User):
for current_user in report['users']:
if user.name == current_user['name']:
await client.say(f"{user.name} has been reported {len(current_user['reasons'])} times : {','.join(current_user['reasons'])}")
break
else:
await client.say(f"{user.name} has never been reported")```
Ok so what's not working/erroring
async def warnings(ctx,user:discord.User):
for current_user in report['users']:
if user.name == current_user['name']:
await client.say(f"{user.name} has been reported {len(current_user['reasons'])} times : {','.join(current_user['reasons'])}")
break
else:
await client.say(f"{user.name} has never been reported")```
@cursive dagger I don't know you were like the 15th million person asking me that today and I do not know how to check
Do I put it in regular python or IDLE
None. Just CMD
Wtf is cmd
Your on win right?
Windows
10?
Sigh
10
lmao how di dhe even made bot without knowing cmd
see that cortana searh bar??
search cmd there
Press the windows button, then type cmd then enter
Command prompt
Ok
python -m discord --version
Isn't it discord.py
latest then
2 versions? Hol up
welp i off
Now what can I do about my problem
Change all your code to rewrite?
Cause your using a async tutorial on discord.py rewrite
How do I change it to rewrite
Documentation?
discord.py docs, fam
๐คฆ
awate....
i am blind
We all are sometimes
Ur missing a ) on member.kick
Lol
Either I need to go to sleep or I'm just playing out dumb now
async def kick(ctx, member : discord.Member, reason=None):
await member.kick(reason=reason)
await ctx.send(embed=embed)```
Not finding command
sigh are you sure its not finding the command? Any output in the console?
Obviously I can't code when I'm tired
You just sent the command wrong in discord
you can't code whether you're tired or not because you're diving into using d.py without knowing the py part of it
@outer niche then don't 
what did you type as the command in discord?
!unban
Then that obviously isnt gonna work
you need to specify a member as you did in your code
Nope didn't work
You need to specify user and reason
!ban @JustEmil#2642 LOL and the user has to be in that guild
reason isn't necessary
true
since they default it to None
Also reasons not necessary it is set to none
I don't get it it says not defined but I defined it
!unban Mudae#0807
Idk what to do at this point
async def unban(ctx, *,member):
baned_users = await ctx.guild.bans()
member_name, member_discriminator = member.split('#')
for ban_entry in banned_users:
user = ban_entry.user
if (user.name, user.discriminater) == (member_name, member_discriminater):
await ctx.guild.unban(user)
await ctx.send(f'Unbanned {user.name}#{user.mention}')```
I see defined baned_users but not a defined banned_users
Whole traceback?
Idk
How do i get this background decoration away?
add display:none to #bot-details-page .shapes-1
okey i did it
How do i fix those lines?
Forget it, i just fix that shit when the bot gets approved
did you just remove the vote and donate buttons ๐ฆ
The bot isnt approved yet
Hi guys have some 404 error page on my discord Server entry on your website . Oswald ( your Moderator ) have try to fix it but doesent work. can some other from your staff help me to fix the Problem ?
@cursive dagger Do you know anything about css?
Yes but im not a expert
You know how to make the bot image card thing to float
Like animation? Or just a shadow so it looks 3d?
animation
https://ianlunn.github.io/Hover/ seems like a good one
Look in ur dms i will send you a link to someone elses bot page so you know what i meant
use keyframe animations
(node:4352) DeprecationWarning: ClientUser#setGame: use ClientUser#setActivity i
nstead what is this error
my bot is works but thats always showns
have you tried reading the error
@outer niche that Lucas' Tutorial is wrong
I use this
@teo.command()@commands.has_permissions(administrator=True, ban_members=True)async def unban(ctx, *, member): bans = await ctx.guild.bans() for ban_entry in bans: user = ban_entry.user await ctx.guild.unban(user) emb = discord.Embed(title='Unbanned!', description=f'{user.mention} has been unbanned!', colour = 0xfff157) await ctx.send(embed=emb) return
Oof
Watch Unban here https://github.com/ssebastianoo/Teo/blob/master/Moderation.py
Quick question, would running two instances of the bot on two different machines require anything other than sharding it correctly and connecting the databases?
not that i know of
as long as you shard correctly with the correct shard IDs, it should work
bans = await ctx.guild.bans()
for ban_entry in bans:
user = ban_entry.user
await ctx.guild.unban(user)
So we just unbanning everyone?
Hello guys,
I have a question. How can i use this features?
Greetings @hushed zodiac with @jade garnet
`app/index.js:263:11 PM
bot.commands.set(props.help.name, props);3:11 PM
^3:11 PM
3:11 PM
TypeError: Cannot read property 'name' of undefined3:11 PM
Jump to
at jsfile.forEach (/app/index.js:26:37)3:11 PM
at Array.forEach (<anonymous>)3:11 PM
Jump to
at fs.readdir (/app/index.js:23:12)3:11 PM
at FSReqWrap.args [as oncomplete] (fs.js:140:20)`
Error at my Log
@hushed zodiac with this https://discordbots.org/api/docs#bots (scroll down to last item)
okey thankyou
@stray garnet you error is Cannot read property 'name' of undefined in index.js line 26
you're trying to get a name of something that doesnt exist
Oh thx
What would be the best method of making a small giveaway "timer" that edits every once a while? My current one is basically 3 intervals. One updates embed every 10 seconds if time remaining is less than 1 minute and etc for rest. But it isnt proving to be very stable. Any ideas for a better version for my rewrite?
What do you guys use? Gitlab or Github? And why
I use gitlab
Cause I prefer it's implementation of ci
And prefer the UI in general
I like the UI too, but I want to upload my public projects and github just seems way more popular
Like "link me ur github project" type of thingy
I don't really find that. Usually it's "do you have a link to your repo" or something along those lines. Have not experienced any backlash or anything from not using github
What do you use as a program for gitlab? I used to use github and then I just switched to use gitkraken as a desktop client
Might gib som code yo know
According to Wikipedia, GitLab has 100,000 users (March 2017) and is used by enterprises such as IBM, Sony, and NASA.
Overall, 26 million people and 1.5 million organizations created 67 million repositories on GitHub in 2017.
So I feel like github would be easier to grow on
I don't think you shod be aiming to use a website such as github or gitlab to grow, they are merely functional websites allowing remote access to your code
Yeah but people post their projects for others to use
Even so, neither website's intended purpose is to aid the Dev in becoming better known
github is a lot more student friendly
How so?
I don't like the gitlab ui
github offers their student pack to students with an edu email, you get a lot of useful stuff in that pack for hosting, domains, web hosting etc.
you also get pro for linking an edu email
agreed
wHaT abOuT BitBUckEt
Still for Enterprise
You are html to my css
nah I'm good
So for one of my bots in discord.py 0.16.12 (I would update it but that would require a whole rewrite which I can't do at the moment), when I restart the bot it needs to be able to see when people add reactions to messages that previously existed (as in messages that existed before the restart) even though the deque for client.messages is emptied after every restart afaik. When I tried to append a message to the client.messages deque, some error came up:
File "/usr/local/lib/python3.5/dist-packages/discord/state.py", line 248, in parse_message_update
message = self._get_message(data.get('id'))
File "/usr/local/lib/python3.5/dist-packages/discord/state.py", line 153, in _get_message
return utils.find(lambda m: m.id == msg_id, self.messages)
File "/usr/local/lib/python3.5/dist-packages/discord/utils.py", line 167, in find
if predicate(element):
File "/usr/local/lib/python3.5/dist-packages/discord/state.py", line 153, in <lambda>
return utils.find(lambda m: m.id == msg_id, self.messages)
This is only part of the error, as the whole thing is too big to send in this message, but I can't figure out how to fix this so that I can append messages to client.messages so that the event on_reaction_add(reaction, user) is able to trigger.
Does anyone have any ideas how to fix the error? I asked this last night but the response was quite unclear
This is a snippet of code that I think is causing the problems:
. @asyncio.coroutine def on_reaction_add(self, reaction, user): for member in dbconn.db["Player"].find(): loaded_member = jsonpickle.decode(member['data']) player = players.find_player(loaded_member.id) for message in player.reaction_messages: message_2 = message[0] reaction_channel = util.get_client(message_2.server[0]).get_channel(message_2.channel.id) message_1 = util.get_client(message_2.server[0]).get_message(reaction_channel, message_2.id) if message_1 is not None and not message_1 in self.messages and isinstance(message_1, discord.message.Message): self.messages.append(message_1)
Self refers to the client
It seems to be the last two lines that are causing the problems
What I think is the problem is this part:
and not message_1 in self.messages
but if it is, then I can't think of a solution
File "C:\Users\culan\AppData\Local\Programs\Python\Python37-32\lib\site-packages\discord\ext\commands\core.py", line 88, in wrapped
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: ValueError: not enough values to unpack (expected 2, got 1
making a bot to check if another bot is online and if itโs not then making that bot automatically start another bot because you donโt know what else to do
What SSH clients do you guys all use?
putty on windows
And what the hell happened with the code above
I'm not unbanning a bot tho
code blocks are good enough imo
they clutter the chat a lot
i personally dislike having to scroll the chat back and forth to read and troubleshoot and write a reply
we get it, you get an error, you don't have to post it for the third time
I'm gonna question presence of discriminater in that code
It's what I was told to put their
!help
Imagine comparing name and discrim when you could just compare ids
they absolutely have no idea what they're doing regardless of that
So put ID instead
Let's not use common prefixes, especially outside of #commands @earnest phoenix
Make it accept ID, culanndog
ok
I remember there being one function especially to see if someone was banned
Guild.fetch_ban, great
async def unban(ctx, *,member):
banned_users = await ctx.guild.bans()
member_name, member_discriminator = member.split('#')
for ban_entry in banned_users:
user = ban_entry.user
if (user.name, user.id) == (member_name, member_id):
await ctx.guild.unban(user)
await ctx.send(f'Unbanned {user.name}#{user.mention}')
```
What is member_idยฟ
I give up on this command
The issue becomes your laziness then
No
This is simple python
If you can't do this you need to learn python again
How are you going to compare something against a variable that hasn't been defined
they didn't know how to open a py file the other day
I saw
i always preach that if you can't do logical problem solving, programming isn't for you
@outer niche member_discriminator, not ID
i got it
the problem with "learning to make a bot" is
you invite many people with zero experience and give them an environment with defined variables
so they learn that "some things can be used" and "some things I have to make"
they miss the lesson on what is and why
generally they don't understand what the library is giving them, and don't understand why copy pasta works or doesn't
@outer niche also, look at the error youโre getting, in python theyโre really helpful to what you need to fix
ok
im guessing in py lib "ctx" is the client?
message.content ?
Yes
ive never used a linux vps, are there any guides on how to install discord.js and then how to put files into it?
you generally shouldn't run debugging versions on a prod machine
@grave pecan this can depend on the linux system and asking are there any guides here slows you down when google is much faster
@maiden mauve in the py lib, ctx is commands.Context, something what you could call a little modification of Message but for commands extension
Ah, was just curious because all I've used is nodejs
It can also be a Messageable by itself, so you can do ctx.send instead of ctx.channel.send
It looked very similar to message object
It's basically a shortcut for Message + some other things
And python uses indents for code blocks?
Yea
Instead of "wrap-it-all-with-{}" it's "MOVE-IT-EVEN-MORE-TO-THE-RIGHT-AFTER-A-COLON-OR-IT-WILL-NOT-WORK" kinda thing
deletedisk
kinda makes sense
maybe the guy who wrote it thought "everyone should do this anyhow"
I figured it out. Linux runs so much smoother than windows lol
For some things
await Promise.all(['โ
', '๐ซ'].map(confirm.react));``````
Promise {
<rejected> TypeError: Cannot read property 'client' of undefined
at react (/Users/sinistrecyborg/Projects/bot/node_modules/discord.js/src/structures/Message.js:430:18)
at Array.map (<anonymous>)
at _dddโanonymous.exec (/Users/sinistrecyborg/Projects/bot/commands/request.js:20:39)
at processTicksAndRejections (internal/process/task_queues.js:85:5)
}```
Why does that happen?
Also confirm is a Message
have more code?
Wait
is that a d.js error?
this is undefined in the Message.js structure
for some reason
@opaque eagle show more code
What do you guys use to get Oauth2 working with Discord? Just the default stuff or any extra node modules
@abstract crow couldn't get passport.js to work?
I gotta read up on it. I didn't know if anyone else used that
Ah
Hi! I keep getting this error when running my discord.js bot:
TypeError: Cannot read property 'hasPermission' of undefined
at Object.module.exports.run (/root/DiscordBotApp/commands/warn.js:23:14)
at Client.client.on.err (/root/DiscordBotApp/bot.js:66:17)
at emitOne (events.js:96:13)
at Client.emit (events.js:188:7)
at MessageCreateHandler.handle (/root/DiscordBotApp/node_modules/discord.js/src/client/websocket/packets/handlers/MessageCreate.js:9:34)
at WebSocketPacketManager.handle (/root/DiscordBotApp/node_modules/discord.js/src/client/websocket/packets/WebSocketPacketManager.js:105:65)
at WebSocketConnection.onPacket (/root/DiscordBotApp/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:333:35)
at WebSocketConnection.onMessage (/root/DiscordBotApp/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:296:17)
at WebSocket.onMessage (/root/DiscordBotApp/node_modules/ws/lib/event-target.js:120:16)
at emitOne (events.js:96:13)
@wooden lance asked me to run a command that I couldn't find.```
My code: https://pastebin.com/P4K1viSi
Any ideas on how to fix?
๐
Lel
im not really a python developer, but im 90% sure that has_permissions is not a decorator or whatever python calls that
Idk I did not create that my friend did
your friend should ask for help then 
^
My friend is not alive anymore
Died 6 months ago stage 4 cancer
How hard is sharding for d.js ๐ค
culanndog3111_gamingToday at 12:23 AM
My friend is not alive anymore
Died 6 months ago stage 4 cancer
summon them from the dead
(edited)
I wish
@client.command()
async def guilds(ctx):
print(client.guilds)
``` how can I have only guild names?
And not this
just a PSA, lying about someone dying from cancer is generally not okay and is disrespectful, where are your morals
you should need to shard right now, but it requires some changes in your code
should not*
for example if your bot uses a db, youd have to spawn multiple db clients depending on how many shards you have
How do we know he is lying?
@valid frigate thanks
@earnest phoenix why would I lie about something like that
@outer niche Sorry to hear that
by using common sense, @abstract crow
hey boys
innocent until proven guilty
thats all im saying
anyways not to minimod or anything but lets move out of this channel
What is a shard 
but just wondering how hard is sharding on d.js shouldn't be too hard unless I fuck something up ๐
Mhm......thanks
take a look at this
I know there's something wrong about that but I'm not quite sure
it's like sub instances if I'm correct
try reading the guide
it explains sharding somewhat generally
but more shards = more memory so you should be prepared for that
Yeah but if Im using a db such as MongoDB it wouldn't have a problem connecting to it right?
i use mongo and i only have 2 shards
@outer niche @commands.has_permissions
so it's normally not a problem
ah okay
ok thx
definitely suggest setting shard count to "auto" though, it will spawn shards as needed
you should need to shard right now, but it requires some changes in your code are you taking with @broken shale?
@valid frigate
yeah
What are the major changes though
Ok
I don't use py sorry
The command is not found
What command
Command not found
Ok
@abstract crow no, AttributeError, that is for the current guild
like ctx.guild
@outer niche you did not put a @bot.command()
In warn
And everyone can purge messages
There is a lot of documentation on pushing a delay into a promise rather than just using a ES6 Timeout block, any particular added security going that route?
I haven't had that method fail me
have you tried reading the error
so you want someone to fix someone elses code so it will run for you
Well the code is neat and clean so you need to learn Python
๐
And I don't know Python, but I am pretty sure client.say isn't actually a thing
^ aka why client is throwing an err?
you're not supposed to use client in the first place
Problem solved โ
i dont even know how client.say(string) would even work
exactly
You're right it should be user: send
ctx.send
Sighs
ctx.send invalid syntax
Ok. Here's what I want YOU to do. Google stuff first. Take some tutorials and lessons online. Read the docs
discord.py docs go in detail about how commands work
This has been going on for about 12 hours now of you just not reading
Theres also a py server where to get additional help on
Sorry I did not mean to put that in here
how can i convert all the default emojis to their names? so like โญ=> "star"
Good question

just map all emojis by unicode and readable name and then use that?
you know how many emojis there are...
way too many lmao?
basically
what do you mean by convert
you could break every message down and search for ": string :"
then if its found, remove the colons
thats, not how that works lol
like this
dw i found a lib for it
its not, a, few lines of code
you do all realize that the unicode emojis are unicode not :string:
then just create a generator and read it from an arr
js?
yes
unicode is a bitch
lol
so using a lib that deals with all the bullshit of unicode isn't a bad idea
and when you get to surrogate pairs it gets even more annoying
my number 1 rule when it comes to unicode: let someone else deal with it
and im done thats actually a lot easier than i thought lol
So for one of my bots in discord.py 0.16.12 (I would update it but that would require a whole rewrite which I can't do at the moment), when I restart the bot it needs to be able to see when people add reactions to messages that previously existed (as in messages that existed before the restart) even though the deque for client.messages is emptied after every restart afaik. When I tried to append a message to the client.messages deque, some error came up:
File "/usr/local/lib/python3.5/dist-packages/discord/state.py", line 248, in parse_message_update
message = self._get_message(data.get('id'))
File "/usr/local/lib/python3.5/dist-packages/discord/state.py", line 153, in _get_message
return utils.find(lambda m: m.id == msg_id, self.messages)
File "/usr/local/lib/python3.5/dist-packages/discord/utils.py", line 167, in find
if predicate(element):
File "/usr/local/lib/python3.5/dist-packages/discord/state.py", line 153, in <lambda>
return utils.find(lambda m: m.id == msg_id, self.messages)
This is only part of the error, as the whole thing is too big to send in this message, but I can't figure out how to fix this so that I can append messages to client.messages so that the event on_reaction_add(reaction, user) is able to trigger.
Does anyone have any ideas how to fix the error? I asked this last night but the response was quite unclear
This is a snippet of code that I think is causing the problems:
. @asyncio.coroutine def on_reaction_add(self, reaction, user): for member in dbconn.db["Player"].find(): loaded_member = jsonpickle.decode(member['data']) player = players.find_player(loaded_member.id) for message in player.reaction_messages: message_2 = message[0] reaction_channel = util.get_client(message_2.server[0]).get_channel(message_2.channel.id) message_1 = util.get_client(message_2.server[0]).get_message(reaction_channel, message_2.id) if message_1 is not None and not message_1 in self.messages and isinstance(message_1, discord.message.Message): self.messages.append(message_1)
(Self refers to the client)
I've asked this twice but I only received one answer, and that answer was unclear and the answerer wouldn't clarify anything
so uh my code doesn't work but it should be working so now i'm angery
@winged thorn explain
no error
I figured it out so dw anymore but
ok
i was angery
npm WARN prism-media@1.0.2 requires a peer of ffmpeg-binaries@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN prism-media@1.0.2 requires a peer of ffmpeg-static@^2.4.0 but none is installed. You must install peer dependencies yourself.
npm WARN prism-media@1.0.2 requires a peer of node-opus@^0.3.1 but none is installed. You must install peer dependencies yourself.
npm WARN prism-media@1.0.2 requires a peer of opusscript@^0.0.6 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.5.1 requires a peer of bufferutil@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.5.1 requires a peer of erlpack@discordapp/erlpack but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.5.1 requires a peer of libsodium-wrappers@^0.7.3 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.5.1 requires a peer of node-opus@^0.2.7 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.5.1 requires a peer of opusscript@^0.0.6 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.5.1 requires a peer of sodium@^2.0.3 but none is installed. You must install peer dependencies yourself.
npm WARN discord.js@11.5.1 requires a peer of @discordjs/uws@^10.149.0 but none is installed. You must install peer dependencies yourself.
when doing npm install discord.js
dw
@calm crown
yeah, you can ignore those.
so uh does anyone have an answer for my inquiry
http://owo.sh/svWepDp.png
http://owo.sh/68LXEdh.png
does someone know why it's like this? It should have 3 items on first and second row and only one on the 3rd one
what's the issue? Seems to be ok
@wheat jolt help
like this?
@woven sundial
then put a space after lol
show me your code
where you define the prefix
"@stark sage ",
"a!"
]```
use this
Because you said you want to be @wheat jolt[SPACE]help
yes
try it
@woven sundial lmk if it works
if not, I think I know why
What if the bot has a nickname? @wheat jolt
his id is the same
That wouldn't work if the bot had a nickname set in the server
When a nickname is set the mention is different
when you mention someone, the bot reads this: <@HIS ID>
No
Discord.changed it i think
Yes but the mention not
Fuckery of Discord libs ngl
not @tribal haven
Used to be a ! in the mention if there was a nick set
hoi
Members can't be bots, users can, so use the user object instead if the member object
i know, just mad
have you tried seeing if it can return anything nsfw
safesearch isn't 100% reliable
const botconfig = require("../botconfig.json");
const ownerID = botconfig.owner;
module.exports.run = async (bot, message, args) => {
let bug = args[0];
if(!bug) return message.channel.send("You must Provide a Bug!");
const embed = new Discord.RichEmbed()
.setAuthor("Bug Report!")
.addField(`Von`, message.author.tag)
.addField(`Bug`, bug)
bot.users.get(`${ownerID}`).send(embed)
}
module.exports.help = {
name: "bugreport",
aliases: []
}```
The Bot don't sends me an Private Message when i type for example `n!bug Test`
@deft bough what library
discord.js
or what ver
discord.api?
the discord one what ever it is called @winged thorn
read that
I have
that tells you how to ban
so define the guild?
well you didnt define the stuff
can u get le awesome green role while im still developing my bot
damn
yes but no
ummm what does that mean
You need to have at least one bot approved
if it is good enough to get approved then you get the green role
maybe i can upload my meme bot :3
how do i define message or define guild
by learning javascript
hmm yes the floor here is made out of floor @fast wagon
<member>.guild
ok
how do i be a certified developer for an even more awesome green role
have a certified bot
Certification requirements: https://discordbots.org/certification
thank you @winged thorn and @fast wagon
Np
i don't think I helped that much
@slender thistle can my bot have a main purpose and then a bunch of random other commands for fun?
No but yes
In other words, yes it can

What if it has lots of random functions but they are all executed exceptionally well
hm
maybe I'll just make my currency system really good then and everything else is secondary
Hello everyone!
Sorry if annoying. I put them in a situation quickly:
I have a command in which only 2 arguments work. After 20 minutes without getting the command to correct if you enter an argument that is not included in the list (that is, it is not one of the 2 valid arguments).
I use the discord.js library
(I don't know if I explained myself correctly)
Soooo do u have code that doesn't work
Or do you want to know how to do it
You need something to detect which arg is missing, then use a message collector so the person can enter the arg that's missing @twin kestrel
C an u change my nickname to "Stoof" @slender thistle
I want to learn to do it
It is a configuration command and currently only has 2 languages. So what I want is to correct users when they don't enter a language correctly
O
So if it detects the language it says do this language?
Srry I don't really understand
I mean if it detects the language that if it is valid, it will change the language, but if it is not valid it will not change it
Ex: !set lang english > It is a supported language
!set lang 432y1kjh > It is not a supported language
Do an if() to check if it's a valid language
I already tried it with that and I still can't make it work with the two supported languages
yeah thats gonna result in way too many if statements after a while
I just get him to verify 1
maybe an array of supported languages and checking if the entered language is in the array?
Check if the language is valid, then return and message.reply() if it isn't
@mossy vine OwO how do u get a purple role
boost server
I don't have nitro 3:
the role is called Nitro Booster, so its kinda obvious
if(!lang === "spanish" || "english") return;```
thats wrong
and when you add more languages it will result in even more mess
That's why I asked for help x2
i suggest you create an array of supported languages
and use <Array>.includes()
nice
ily supportserver
This server is NOT the support server for ANY bot. You need to click on the "Support Server" button on the bot's page, NOT the "Join Discord" button at the top of DBL.
wrong server
K
How to check if an Channel is NSFW?
Check if channel is NSFW, you mean
oh yes
What library
d.js
TextChannel#nsfw
Assuming you are using stable version, but it seems to be the same on dev version too 
Thanks
@slender thistle bids for front page tags?
Any
okey
client.guilds.forEach((guild) => {
console.log(guild.name)
}``` @lusty dew I think
@lusty dew so working?
Yea now I'm trying to get a channel ID from one of the listed guilds lol
easy*
Just seeing what's possible
client.guilds.forEach((guild) => {
console.log(guild.name + guild.channels.find(ch => ch.type === 'text').first().id)
}``` @lusty dew
All good? @lusty dew
syntaxerror
why?
Try evaluating it
I did
what bot can i use to eval()?
And even then guild.channela.find isn't a function
Or at least that's what my bot returns
When I eval it
You forgot an ) as well
client.guilds.forEach((guild) => {
message.channel.send(guild.name + guild.channels.find(ch => ch.type === 'text').first().id)
})
Even then, you'll still get a typeerror in 99% of situations. Assuming you only want the channel, you could just call <Client>.channels to return a collection (If you're using discord.js)
I could use a little help if anyone is not busy.
what do you need help with
(what I am trying to do)
make a bot for my friend who is an artist.
He asked me to make a bot that can add people to like a waiting queue so he knows who is next in line.
also for a command like <prefix>queue and it will show the list of members in the queue.
The problem I have is..I don't know where to start and I can't find any references anywhere to get an idea.
The name of a channel? You could try "finding" it.
Ori that's not something we can just "help" you with if it's not like a snippet you're having trouble with
No name of guild
I was hoping for a website to go to or somewhere to find atleast something
just use an array
you can do everything that you described
you can Google "array methods" to learn more about those
Ok.
Thanks
@sudden geyser I'm talking about if I provide the guild name
How would I get the ID of the first text channel
what do you mean with first, first as position or first as creation date
Position
So for one of my bots in discord.py 0.16.12 (I would update it but that would require a whole rewrite which I can't do at the moment), when I restart the bot it needs to be able to see when people add reactions to messages that previously existed (as in messages that existed before the restart) even though the deque for client.messages is emptied after every restart afaik. When I tried to append a message to the client.messages deque, some error came up:
File "/usr/local/lib/python3.5/dist-packages/discord/state.py", line 248, in parse_message_update
message = self._get_message(data.get('id'))
File "/usr/local/lib/python3.5/dist-packages/discord/state.py", line 153, in _get_message
return utils.find(lambda m: m.id == msg_id, self.messages)
File "/usr/local/lib/python3.5/dist-packages/discord/utils.py", line 167, in find
if predicate(element):
File "/usr/local/lib/python3.5/dist-packages/discord/state.py", line 153, in <lambda>
return utils.find(lambda m: m.id == msg_id, self.messages)
This is only part of the error, as the whole thing is too big to send in this message, but I can't figure out how to fix this so that I can append messages to client.messages so that the event on_reaction_add(reaction, user) is able to trigger.
Does anyone have any ideas how to fix the error? I asked this last night but the response was quite unclear
This is a snippet of code that I think is causing the problems:
. @asyncio.coroutine def on_reaction_add(self, reaction, user): for member in dbconn.db["Player"].find(): loaded_member = jsonpickle.decode(member['data']) player = players.find_player(loaded_member.id) for message in player.reaction_messages: message_2 = message[0] reaction_channel = util.get_client(message_2.server[0]).get_channel(message_2.channel.id) message_1 = util.get_client(message_2.server[0]).get_message(reaction_channel, message_2.id) if message_1 is not None and not message_1 in self.messages and isinstance(message_1, discord.message.Message): self.messages.append(message_1)
(Self refers to the client)
can someone please help i've asked like 3 times
That traceback isn't helpful 
oh sorry, is there anything that would be helpful
The traceback is telling us what happened in the module not what caused it from your code
Ok, well the problem seems to be in the last two lines,
if message_1 is not None and not message_1 in self.messages and isinstance(message_1, discord.message.Message):
self.messages.append(message_1)
what's self.messages
Oh it's the client.messages cache
From the docs:
messages
A deque of Message that the client has received from all servers and private messages. The number of messages stored in this deque is controlled by the max_messages parameter.
so why are you managing it yourself?
it might just be discord.Message
isn't it just discord.Message
I'm appending to it myself because it's emptied whenever the bot restarts, and I need the bot to see on_reaction_add() events for messages sent before a restart
I have the message IDs and the message Objects stored with the player that used the command to create them, so I figured if I just appended the discord.Message to the client.messages deque it'd work, but the traceback has something along the lines of AttributeError: 'generator' object has no attribute 'id'
And I don't know how it thinks the message object is a generator without the id attribute, as I added the check to make sure the thing it appends is a message object
Can you send the full traceback?
In a pastebin if it's really huge
Oh sure
Traceback (most recent call last):
File "run.py", line 307, in run
asyncio.run_coroutine_threadsafe(client.run(bot_key), client.loop)
File "/usr/local/lib/python3.5/dist-packages/discord/client.py", line 519, in run
self.loop.run_until_complete(self.start(*args, **kwargs))
File "/usr/lib/python3.5/asyncio/base_events.py", line 387, in run_until_complete
return future.result()
File "/usr/lib/python3.5/asyncio/futures.py", line 274, in result
raise self._exception
File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step
result = coro.send(None)
File "/usr/local/lib/python3.5/dist-packages/discord/client.py", line 491, in start
yield from self.connect()
File "/usr/local/lib/python3.5/dist-packages/discord/client.py", line 448, in connect
yield from self.ws.poll_event()
File "/usr/local/lib/python3.5/dist-packages/discord/gateway.py", line 431, in poll_event
yield from self.received_message(msg)
File "/usr/local/lib/python3.5/dist-packages/discord/gateway.py", line 390, in received_message
func(data)
File "/usr/local/lib/python3.5/dist-packages/discord/state.py", line 248, in parse_message_update
message = self._get_message(data.get('id'))
File "/usr/local/lib/python3.5/dist-packages/discord/state.py", line 153, in _get_message
return utils.find(lambda m: m.id == msg_id, self.messages)
File "/usr/local/lib/python3.5/dist-packages/discord/utils.py", line 167, in find
if predicate(element):
File "/usr/local/lib/python3.5/dist-packages/discord/state.py", line 153, in <lambda>
return utils.find(lambda m: m.id == msg_id, self.messages)
AttributeError: 'generator' object has no attribute 'id'
@slender thistle here, sorry for late response
What are message_1 and message_2 
oh well message_2 is the discord.message object that I use the id function of to get the actual message's channel and the actual message itself
and message_1 is the actual message that I want to append to client.messages
@client.command()
async def join(ctx):
channel = ctx.author.voice.channel
await channel.connect()
``` `OpusNotLoaded` what's Opus?
I can't npm install canvas
libopus
yes
no
used for voice with discord.py
ok, thanks
when you installed it did you do
pip install discord.py
or pip install discord.py[voice]
https://github.com/nodejs/node-gyp/blob/master/README.md#on-windows @nova heath try option 1
If it doesn't work use option 2
you need node-gyp for canvas
@winged thorn i did it
I see you're getting help in the discord.py discord
what plat?
macos
ok
ldconfig -v | grep --color opus
command not found
thankss ยฏ_(ใ)_/ยฏ
replace ldconfig with pkgutil?
@indigo geyser it says on the docs how to fix it
The warning on the voice section
Ok
does someone knows how to put a line break after a caracther limit is reached without breaking the words?
eg:
I have: var string = 'Bob wants to play'
and the caracther limit is 5
the text would turn to:
Bob
wants
to
play
process.setMaxListeners(number); @soft cove
thanks
@soft cove do you have multiple message listeners?
^
oh and how can i see my current max listeners?
mem leak btw
hey i'm making a message counter bot with quick.db
the command allows admins to add messages to themselves or any member but it says .add is not a number
can anyone help me with this
sure
const Discord = require('discord.js')
const db = require('quick.db')
const bot = new Discord.Client()
bot.on('ready', async => {
console.log(`I'm on somehow`)
})
bot.on('message', async message => {
let args = message.content.slice(1).split(' ')
const cmd = args.shift().toLowerCase()
db.add(`messageCount_${message.author.id}`, 1);
if(message.content.startsWith(`-messages`)){
let member = message.mentions.members.first() || message.author;
let mdb = await db.fetch(`messageCount_${member.id}`)
message.channel.send(`Mesages: ${mdb}`)
}
if (message.content === `-ping`) {
message.channel.send(`Ping: ${bot.ping.toFixed(0)}`)
}
if (message.content.startsWith(`-add-message`)) {
if(!message.member.hasPermission("ADMINISTRATOR")) return message.channel.send("You don't have the permission to do that")
let user = message.mentions.members.first() || message.author;
let number = args[1];
console.log(number)
db.add(`messageCount_${user.id}`,number)
message.channel.send("DOne")
}
if (message.content.startsWith(`-reset`)) {
if(!message.member.hasPermission("ADMINISTRATOR")) return message.channel.send("You don't have the permission to do that")
let user = message.mentions.members.first() || message.author;
let number = args[0];
db.set(`messageCount_${user.id}`, 0)
message.channel.send("DOne")
}
})```
@opaque eagle
logging number says it's unindentified
Hmm... what does the error say exactly
It should show a stack trace too...
What do you guys think so far? https://vinniehat.tk/ my first ever website published. (Not Finished at all)
It looks pretty good
Thanks! Any suggestions?
when i logged the number it said unindentified
is it me or are discord image embeds not loading
^
^
Idk man, go ask the plexi dev server @cursive gale
what's that server
How do u turn off dark mode in the site?
ohh no
you cant 
@abstract crow ๐ for dark mode
its kinda weird that your discord username appears on the opposite end of the screen making it impossible to copy
these titles should be hyperlinks
can anyone help me here?
not many people use quick.db
Yeah the color makes people think those a hyperlinks
because its shit 
So our innate response is to try and click on them
hmm
Turtle is right, quick.db is bad and shouldn't be used for any production-ready app
what db is easy to use and i can use?
If you want a similar alternative, I'd suggest keyv... The Discord.js community made a tutorial on using keyv in a discord bot. https://discordjs.guide/keyv/
A guide made by the community of discord.js for its users.
sql requires you to use a whole other language in your project. if you dont wanna deal with that, theres the well supported and highly praised mongodb
keyv looks interesting actually
I keep getting this error from the dbl api
Error: Server responded with 504
at get.concat (/app/node_modules/canvas/lib/image.js:56:28)
at concat (/app/node_modules/simple-get/index.js:89:7)
at IncomingMessage.<anonymous> (/app/node_modules/simple-concat/index.js:7:13)
at Object.onceWrapper (events.js:286:20)
at IncomingMessage.emit (events.js:203:15)
at IncomingMessage.EventEmitter.emit (domain.js:448:20)
at endReadableNT (_stream_readable.js:1145:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
``` I know it's not my fault as 5xx but how can I filter it out
That looks more like it's from the canvas module, not DBL's API
const dblapi = require('dblapi.js');
const dbl = new dblapi('token')```
right?
how can i print a hole error ?
hole error?
you meant whole error
Library
you need to write a function for it, but yes, whole error
if it's discord.py not really
unless its discord.py
d.js you'll need to
yep thats what mine is in 
same 
const dblapi = require('dblapi.js');
const dbl = new dblapi('token')```
Can someone tell me if this is correct?
should be
lmao. Lemme check smth for you
@peak quail Just create a variable when your exeption occurs.
Then paste the variable to your message or embed.
try:
#your code
except Exception as e:
await ctx.send(f'Error Message:\n`{e}`')
Something like that.
But watch out, that uses Exeption, it catches all errors so put your other error catchers before it.
How do I fix an error with Access-Control-Allow-Origin
[Error] Failed to load resource: Origin https://fiddle.jshell.net is not allowed by Access-Control-Allow-Origin. (glen-dragon.glitch.me, line 0)```
Am i missing something on updating the server count in the DBL api? i'm sending update requests every 30s but it's still on N/A
Server count should be updated every 30 minutes
The ratelimit for DBL's API generally is 60/min
The count on the websites updates every time you update it, and you must update it every 30 mins.
well i'm updating every 30s so i'm not hitting the rate limit
and it's not updating
oh hey you know what
nevermind i'm fucking stupid
The official libraries update it every 30 minutes by default, so that's what I'd suggest.
https://github.com/DiscordBotList/dblapi.js/blob/master/src/index.js#L38
An official module for interacting with the discordbots.org API - DiscordBotList/dblapi.js
That line of code shows 1800000 which is 30 minutes in milliseconds ( 1800000 / 1000ms in a sec / 60sec in a min = 30 min)
i'm using the java library though and i already have a loop running every 30s anyways so it's easier to add it in there
alright
Server count should update instantly you said right?
can somebody help me with an issue I'm having
I'm trying to make a line graph using Chart.js... why is the graph showing up empty?
https://jsfiddle.net/azx41ev6/
Test your JavaScript, CSS, HTML or CoffeeScript online with JSFiddle code editor.
All the y-values seem to be at 0 (the line is right on top of the x-axis)... even though they're not
@lost bramble List your issue
Essentially, I'm trying to learn bot development
I am setting up my tsconfig.json and when I go to my index.ts to try and build it so that it converts to index.js I get an error that says tsc is an unknown command
Yeah, you have to install typescript. Any one of the three works tbh: brew install typescript npm i -g typescript yarn global add typescript
let me try the middle one
I got notice that I update it when I try the method done in the video
I tried the middle and I got an error message
multiple
npm WARN checkPermissions Missing write access to /Users/cnazarko/.npm-packages/lib/node_modules/typescript
npm ERR! path /Users/cnazarko/.npm-packages/lib/node_modules/typescript
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/Users/cnazarko/.npm-packages/lib/node_modules/typescript'
Camerons-MBP:typescriptBot cnazarko$ npm i -g typescript
npm WARN checkPermissions Missing write access to /Users/cnazarko/.npm-packages/lib/node_modules/typescript
npm ERR! path /Users/cnazarko/.npm-packages/lib/node_modules/typescript
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/Users/cnazarko/.npm-packages/lib/node_modules/typescript'
npm ERR! [Error: EACCES: permission denied, access '/Users/cnazarko/.npm-packages/lib/node_modules/typescript'] {
npm ERR! stack: "Error: EACCES: permission denied, access '/Users/cnazarko/.npm-packages/lib/node_modules/typescript'",
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/Users/cnazarko/.npm-packages/lib/node_modules/typescript'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator (though this is not recommended).
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/cnazarko/.npm/_logs/2019-08-04T19_46_13_739Z-debug.log
Camerons-MBP:typescriptBot cnazarko$
Try doing sudo npm i -g typescript (you'll have to enter your password)
run it as admin
On a side-note, how did you install node.js/npm first?
that doesnt look like unix 
ik
it's in the console on visual studio
Did you try running it with sudo?
one sec
@mossy vine I was making what we call a joke
As the error and Cyber say.
Rerun it as Administrator.
A joke in #development? @copper cradle
hmm
Now try running tsc ... that you initially ran
you're not actually installing it
what am I doing
npm has no write access to /Users/cnazarko/.npm-packages/lib/node_modules/
yah, that's what I saw as a solution
change the owner of those folders
I made a .npm-packages folder earlier for g installations


