#development
1 messages · Page 588 of 1
yeah but you told me to do json.load
I never did?
json.loads
mhm
@client.command(pass_context=True)
async def poll(self, *, polldata):
options = {"✅": "Yes",
"❌": "No" }
vote = discord.Embed(title="Poll:", description="{}".format(polldata), color=discord.Colour.gold())
value = "\n".join("- {} {}".format(*item) for item in options.items())
vote.add_field(name="Vote now!", value=value, inline=True)
await client.say(embed=vote)
await client.add_reaction(react_message, emoji='✅')
await client.add_reaction(react_message, emoji='❌')```
how do i make it so the bot reacts to its own message like this but it wont react with ✅ or ❌
@eager rivet which bot it is
neither
What you said doesn't make much sense
mhm
@eager rivet react_message is not defined
Bhai mujhe koi bot banane batayega
What is that supposed to be
Install Git?
thanks
Koi bataye ga bhi
hq answer bot
Indin or internasnal bot mere server me add kar doge
also go to #memes-and-media
which is why you shuold move to offtopic
non english should be in #memes-and-media
also are they even talking about development
i dont see any code 🤔
Bhai aap logo ko answer bot banane aata hi
he is asking about answer bot in hindi
so its not about development
=/
ok i am going
How would i make my bot send a message if you use a command and you are not the owner?
check for message author id
Would be helpful to see your code, your command usage and the error itself
yay my bot got approved
cool
good job!
how do you all create bots?
Too fast for me
Then why ask how to make
hmmm
With the power of progaming
How would I make my bot so it edit the message if I wrote anything
If it's written 0
And I write 1
It becomes 10
Its not that simple
But assuming youre using discord.js you can use channel.awaitMessages and then use message.edit
Look them up in the docs
Implement ten to a stored variable every time
hey
if(!message.author.id == „Id1" || „Id2") return message.channel.send(„No Perms“);
this code do not work
can anyone help me to fix?
===
if(!message.author.id === „Id1" || „Id2") return message.channel.send(„No Perms“);
ohh
sry
@delicate kettle you cant use that kind of quotation marks
it works now
It has to be either " " or ' ' or ` `
thx trying for helping me
Is that or even valid
So right after I check for a message having a prefix ( ! ) I had it log something to console and send a message. It sometimes sends the message and logs the message but otherwise it doesn't. Is this an internet connectivity issue?
node.js
did you mean to write "sometimes" instead of "otherwise"?
your otherwise could be interpreted as it responding when a prefix is present but not doing anything when it's not (which should be perfectly normal behaviour)
hello
hi
please help me
mind posting the respective code snippet? your connection would have to be as bad as it gets without having the bot time out if it simply ignores half of its requests
I want only the id to give can establish the command
What to help
so you want to restrict access to a command by user id?
yes
which library are you using?
Node.js
node.js is a run-time environment for javascript
thats not a library
thats not your library
since you work with node.js you're probably using discord.js or eris, which one is it
if (!message.content.startsWith(prefix)) return;
const args = message.content.slice(prefix.length).trim().split(/ +/g);
const command = args.shift().toLowerCase();
console.log(`${command} ${args[0]}`);
var wwmemes = ["1", "2", "3"]
var memes = ["1", "2", "3"]
message.channel.send("Inner meme activated")
discord.js
So I've sent message like !reeee, but that only logs to console and doesn't send the message. I got it to send once but that's all, not sure what's going on.
Probably something with arrays since I'm not too familiar with js
and whats your prefix?
given that his message was !reeee and he got a console log it's probably gonna be !
else it should've returned
Yes, prefix is !
is it possible to restart a bot with no downtime
like, can you slowly restart shards and move servers on a stopped shard to another shard or something
Can someone tell me why
this return with ctx is a required argument that is missing, when i run it
@golden ice just run a second instance of the bot
update the old one
stop the second instance
@unreal rampart try self, ctx, url

Unclosed connection
client_connection: Connection<('discordbots.org', 443, True)>
Unclosed response
client_response: <ClientResponse(https://discordbots.org/api/bots/547546531666984961/stats) [200 OK]>
<CIMultiDictProxy('Date': 'Fri, 15 Mar 2019 17:27:21 GMT', 'Content-Type': 'application/json; charset=utf-8', 'Content-Length': '2', 'Connection': 'keep-alive', 'Set-Cookie': '__cfduid=d8ec1fc5f59f0131555bda013bc20ca4f1552670841; expires=Sat, 14-Mar-20 17:27:21 GMT; path=/; domain=.discordbots.org; HttpOnly; Secure', 'X-Powered-By': 'Express', 'Access-Control-Allow-Origin': '*', 'Access-Control-Allow-Headers': 'Authorization', 'Etag': 'W/"2-vyGp6PvFo4RvsFtPoIWeCReyIC8"', 'X-Varnish': '1044971606', 'Age': '0', 'Via': '1.1 varnish-v4', 'Accept-Ranges': 'bytes', 'Strict-Transport-Security': 'max-age=15552000; includeSubDomains; preload', 'X-Content-Type-Options': 'nosniff', 'Expect-Ct': 'max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"', 'Server': 'cloudflare', 'Cf-Ray': '4b80329649d94310-MXP')>
someone to help me?
async def server_task():
while True:
payload = {"server_count" : len(client.servers)}
async with aiohttp.ClientSession() as aioclient:
await aioclient.post(url, data = payload, headers = headers)
await asyncio.sleep(10)
async def on_server_join(server):
payload = {"server_count" : len(client.servers)}
async with aiohttp.ClientSession() as aioclient:
await aioclient.post(url, data = payload, headers = headers)
async def on_server_remove(server):
payload = {"server_count" : len(client.servers)}
async with aiohttp.ClientSession() as aioclient:
await aioclient.post(url, data = payload, headers = headers)
@client.event
async def on_ready():
client.loop.create_task(server_task())
this is where error comes from
@golden ice guilds can't be moved between shards -- each guild id is assigned to a guild through unchanging math
Hey, just curious if it’s possible to make this a bit smaller:
function dbHandler(REQ) {
return function(result) {
if(result.replaced < 1) REQ.res.json({error: "db_handler"})
//more but I’m not gonna extend it
}
}```
The basic premise is that I make a new instance of that function so that req is different every time (because it changes through requests (obviously)) and then just to have one easy function to throw into the .then and it can just handle the response instead of having to write it out multiple times throughout my different endpoints etc. I’m willing to bet there’s a better way of doing this but that was just my logic, so I was curious if anyone knew if there was and what would it be?
how i define let like let let = let or what someone halp pls 
Normally let let const let = let 4
i was joking too....
connect, to what?
to voice channel
at Client.<anonymous> (C:\Users\chill\Desktop\chill\discord-bot\bot.js:390:35)
at Client.emit (events.js:189:13)
at MessageCreateHandler.handle (C:\Users\chill\Desktop\chill\discord-bot\node_modules\discord.js\src\client\websocket\packets\handlers\MessageCreate.js:9:34)
at WebSocketPacketManager.handle (C:\Users\chill\Desktop\chill\discord-bot\node_modules\discord.js\src\client\websocket\packets\WebSocketPacketManager.js:103:65)
at WebSocketConnection.onPacket (C:\Users\chill\Desktop\chill\discord-bot\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:333:35)
at WebSocketConnection.onMessage (C:\Users\chill\Desktop\chill\discord-bot\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:296:17)
at WebSocket.onMessage (C:\Users\chill\Desktop\chill\discord-bot\node_modules\ws\lib\event-target.js:120:16)
at WebSocket.emit (events.js:189:13)
at Receiver._receiver.onmessage (C:\Users\chill\Desktop\chill\discord-bot\node_modules\ws\lib\websocket.js:137:47)
at Receiver.dataMessage (C:\Users\chill\Desktop\chill\discord-bot\node_modules\ws\lib\receiver.js:409:14)
(node:3920) 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:3920) [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.
smh
that's not a valid token tho
it isnt?
hold up
i dont wanna minimod but you should take this shitposting to #memes-and-media
xD ok
@junior summit actually send the code please
why
wew setting up a database on aws, neat
epic
@junior summit because how am i supposed to tell you what's wrong if i dont know what's wrong 
just send the code around and of the line making the error
hm
anyone know any good weather api's?
Ignoring exception in on_message
Traceback (most recent call last):
File "C:\Users\atill\AppData\Local\Programs\Python\Python36\lib\site-packages\discord\client.py", line 307, in _run_event
yield from getattr(self, event)(*args, **kwargs)
File "C:\Users\atill\Downloads\Epic Bot\server.py", line 436, in on_message
users = json.load(f)
File "C:\Users\atill\AppData\Local\Programs\Python\Python36\lib\json\__init__.py", line 299, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "C:\Users\atill\AppData\Local\Programs\Python\Python36\lib\json\__init__.py", line 354, in loads
return _default_decoder.decode(s)
File "C:\Users\atill\AppData\Local\Programs\Python\Python36\lib\json\decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Users\atill\AppData\Local\Programs\Python\Python36\lib\json\decoder.py", line 355, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting ',' delimiter: line 1 column 8194 (char 8193)```
```py
@client.command(pass_context=True)
@commands.cooldown(1, 86400, BucketType.user)
async def daily(ctx):
users = json.load(open('currency.json', 'r'))
users[ctx.message.author.id]['money'] += 1000
with open ('currency.json', 'w') as f:
json.dump(users, f)
await client.say("You recived 100 E-Coins :ECoin:")```
not giving users the money but showing the message
https://cdn.discordapp.com/attachments/392215236612194305/556234622732599298/unknown.png
how about not using json as a database because it was never intended for that in the first place
Is anyone else using PHP for their bot?
Not quite true
Yasmin works, was updated 3 days ago: https://github.com/CharlotteDunois/Yasmin
There was another one but was awful, like genuinely awful
Need help
Need information
lol
Lul
Token invalid
but can it english
have you tried refilling the engine with gas?
define msg
use your brain
its not rocket science
read your errors
or maybe try learning how to debug your code:
Step 1: Look at the pins in this channel to find documents on learning JavaScript
Step 2: Learn how effective and fast Google can be as a debugging tool just with searching
https://support.google.com/websearch/answer/134479?hl=en
Step 3.a: Learn debugging
https://www.codementor.io/mattgoldspink/how-to-debug-code-efficiently-and-effectively-du107u9jh
Step 3.b: Learn how to effectively debug with stack traces in JavaScript
https://harrymoreno.com/2017/02/25/how-to-read-a-javascript-stack-trace.html
i have already defined
try defining it a second time
may i dm yop
no
line 178 of your code My english is very bad
its only on 247 lines
show the line 178
yes
what
my english poor
@languid dragon what i have to remove
@oblique gulch
help
try run the code without msg.reply
you need code
yep
dm
ok
{
"embed": {
"color": 6742554,
"fields": [
{
"name": "🤔",
"value": "%mention%"
},
{
"name": "date",
"value": "%votedate%"
}
]
}
}
how do i make the %mention% work
help
is it to mention the user who said it or smth
its webhook api
oh
That’s not how you add mentions
yes
How do I stop time for 5 seconds in JS
I want to make a loop and it has to wait 5 seconds to do the second thing I say
setInterval
like
while(True) {
k
How do I see in how much server is my bot in?
like in message
is it ${guild.memberCount}
no
this is kinda drip feeding but ${message.client.guilds.size} or just client if you have access to it directly
im gonna test it
this is assuming a lotta stuff btw
well i mean in that case
you dont have a message object
you must be new to coding?
please learn javascript proprely before making bots, or at least read the libraries docs
I know that it's bad to leak my Discord bot token, is it similarly bad to leak a DBL API token too?
yes
why
because it can be abused just as well
ye
just dont leak any tokens
ok let's leak a discord bot token... (not one from a bot for which I wrote any code, just a bot for leaking its token)
???
To test if a leak bot which destroys servers like in the discord.py server exists here too
anything thats accessible to only you is considered to be private, secure your private infofmation
it can possibly lead your account to suspension if abused
yup I'm heavily dumb
is it if(err){
message.channel.send("Error")
}
Pringle what kind of bot is ur bot 544007786963402752
sa
})
bot.on('guildMemberAdd', member => {
member.createDM().then(channel => {
return channel.send('Bienvenue sur mon serveur ' + member.displayName)
}).catch(console.error)
// On pourrait catch l'erreur autrement ici (l'utilisateur a peut être désactivé les MP)
})
bot.on('message', message => {
if (message.content.startsWith('!play')) {
// On récupère le premier channel audio du serveur
let voiceChannel = message.guild.channels
.filter(function (channel) { return channel.type === 'voice' })
it is true?
wdym "is it true"
@slim heart sorry but i am french xd
i have a "good english" but not very goof
good*
no, but is it true, because i created bot for my server @slim heart
well why dont you try it?
ok then wait?
yes it is.
legend says the more you complain about how long it is the longer it takes 👀
@slim heart its true xd but the verification last 1 hour or 1 day?
neither
longer
this is like the third time you've been told to look at #502193464054644737
my bot is in verification
@earnest phoenix how about testing it on your server instead of waiting for bot verification and then testing the code
@minor coral How to test on my server?
invite it then run it 
^^
dude
thats not how it works lmfao
maybe read more into what a bot is before trying to make one please
Here Under verification means that bot is being tested by mods and will be approved to list it in the dicord bots list
Your bot must be online for us to test it
You can use bot without verification on your server
🚧 We do not host bots 🚧
how to invite my bot on my server?
@slim heart No How to add my bot in my server when my bot is in verification
this is not an official thing
its just a list
you have to invite it like you'd invite any bot normally
go into the application > oauth and you can figure it out from there
Here replace BOT_CLIENT_ID with your bot client id which you can found in developers dashboard
Yeah! I agree
He should read official docs of Discord
that invite url is invalid UNKNOWN_ERROR
idk if thats a joke or not
partially a joke but it's really invalid
no shit sherlock
- read the rest of the messages for context
- everyone knows it's invalid if they look closely that
client_id=doesn't have a valid client id
do you even consider yourself a bot dev?
kek
X
then no one really asked for that comment
¯_(ツ)_/¯
smh
true though
Hey i share that invite link for hoister no hoistimg ans asked him to change it with his bot id
You forgot a placeholder for bot permissions IMO
otherwise that bot had none AFAIK
But will they have all permissions they need?
does it matter?
No he need to manually give bot role or any other role to bot for perms
Else the bot will have perms of everyone in his server 😜
Which might possibly be none if he set up a members role for that
The bot will have members perms😜
Also not all the cmds need admin or manage server role
I usually invite bots without perms thing in link so that i can give a one role to bot and manage their perms manually 😂
😜
Hello,
is it allowed / bad practice / user unfriendly to write directmessages on levelup with a level bot, that grants xp based on chatactivity?
If no, is it allowed to default the setting for servers/users, so that it doesnt send, but can be activated?
latter and latter
?
Dms are bad practice
Channel messages are fine, many big bots do that, but it can easily get annoying
Thanks tim.
I find my server cleaner using DMs, but some users are blocking DMs so now I need to catch that and use a channel instead...lame
you should catch for most things
Yes for most things I catch just to console.error
Dm levelup messages are like, reeeeally annoying
I would stop using any bot that has them lol
I don't have any levelup system. My bot just answer your commands so no spam btw.
what bot is yours
If the response is supposed to be private, then its fine
NewVoc, made to create and manage temporary voice channels
It's not really private it server oriented...I'm not a fan of bot spam in general channels but I'll have to use it when the user is blocking DMs
The problem with dms is that the user has to cobstantly switch chats, which is really annoyibg
To prevebt bot spam you can put responses on a timer and selfdelete
i need help it said thrw error connection not made within 15 sec
That's a good idea, I'm gonna think about that.
Show error code and which language / library youre using
if (!message.member.voiceChannel) return message.channel.send('Please connect to a voice channel.');
if (message.guild.me.voiceChannelID == message.member.voiceChannelID) return message.channel.send('Sorry, you are already connected to the same channel');
message.member.voiceChannel.join();
message.channel.send('Connecting to your Channel. Just a moment......');
}``` thats my codew
i deleted the eror by accident
discord.js
Could you try to move the user in the same vc as the bot. I think that's what you are trying to do right ?
yea
(message.member.setVoiceChannel(message.guild.me.voiceChannel)) something like that
i anna do
bot joins user
not bot o user
user to bot*
something like this
idk
throw er; // Unhandled 'error' event
^
Error: Error: Connection not established within 15 seconds.
at VoiceConnection.authenticateFailed (/Users/user/Documents/NodeJS/MusicBot/node_modules/discord.js/src/client/voice/VoiceConnection.js:257:26)
at connectTimeout.client.setTimeout (/Users/user/Documents/NodeJS/MusicBot/node_modules/discord.js/src/client/voice/VoiceConnection.js:278:18)
at Timeout.setTimeout (/Users/user/Documents/NodeJS/MusicBot/node_modules/discord.js/src/client/Client.js:446:7)
at ontimeout (timers.js:488:11)
at tryOnTimeout (timers.js:323:5)
at Timer.listOnTimeout (timers.js:283:5```
it literally says the error.
thats not the specific every i got
error
its one i looked up on the internet
cuz i closerd it
@fiery birch
disturbing my anime like that
Do your job 

im trying to make a command where the message author gets a dm from the bot but its not working code: @bot.command() async def sendchlorine(ctx, member): await ctx.send_message(message.author, "test")and the error is: Ignoring exception in command sendchlorine: Traceback (most recent call last): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\discord\ext\commands\bot.py", line 899, in invoke await ctx.command.invoke(ctx) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\discord\ext\commands\core.py", line 607, in invoke await self.prepare(ctx) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\discord\ext\commands\core.py", line 572, in prepare await self._parse_arguments(ctx) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\discord\ext\commands\core.py", line 490, in _parse_arguments transformed = await self.transform(ctx, param) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\discord\ext\commands\core.py", line 342, in transform raise MissingRequiredArgument(param) discord.ext.commands.errors.MissingRequiredArgument: member is a required argument that is missing.
can somebody help
@zenith plaza
@spark comet.command()
async def sendchlorine(ctx):
member = ctx.message.author
await ctx.send_message(member, "test")
dont remember if you need pass_context=True on rewrite
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'Context' object has no attribute 'send_message'
oof
ill have to try it on rewrite, but i dont have it installed rn so i cant
oh ok, ill try to find it for the rewrite
@spark comet.command()
async def sendchlorine(ctx, member: discord.User, message)
await member.send(message)
@zenith plaza
usage,
!sendchlorine @rnd you are mom gay
What?
np
ill make it say who sent it then
I just have a question why it's there anyways
so i want to add a space before the command prefix but it doesnt seem to be working
Can you post a pic?
prefix = " -"
client = commands.Bot(command_prefix=prefix)
that might help
i dont know js sorry
hmm, anyone know why i get this?
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'Context' object has no attribute 'id'
prob this
You're going to need to include more information about what's happening @unreal rampart such as your code, what causes this, etc.
AttributeError: 'Context' object has no attribute 'id'
???
ok so then
where are you doing somthing(.maybesomthing).id
i honestly dont know what you mean
is this async
yes
Yes?
i posted the screenshot
I don't know python, I probably can't help mutch
How is everyone doing their command handling? A bunch of IF statements or dedicated command classes / handlers
So effectively the latter?
yes
Python I presume?
reflection and immutable arrays 🙃
Ahhh I'm using PHP, cos I hate myself
i'm using a proper command handling library for .net
Nice, I was using a function per command, now switching over to a class per command
cos abstraction
hello, im looking for a way to auto delete bot commands in my server (messages that start with -)
is that possible?
get the msgs in the chat, filter the msgs that start with the prefix then delete all the msgs
what bot can i do this with?
im basically trying to auto delete commands sent to Pokecord
The best you'd get is if that particular bot provides a function to delete any successful command invitations
Invokations
i dont think pokecord provides that
Ask the devs to add that, maybe you'll get lucky
😮
How about using
message.delete();```
At the end of the command which you want to automatically delete.
@earnest phoenix dr. Runk helped you
You just need to edit json file which contain your prefix
"default": " lunar",
what
For adding space before your prefix
adding a space to the prefix before and after doesnt make it work
i want it to be
lunar help not lunarhelp
Oh
Then
command===' help'
Or
In your json file
"deault": "lunar "
}```
Or you can make it like
message.contents.include('lunar help')
Thats bad practice
to check if the channel is nsfw would it be
Channel.is_nsfw```
it is bad practice
i got it guys
i put @commands.cooldown(5, 10, commands.BucketType.member) but it won't do the cooldown
At all?
Either your didn't restart your bot after saving the file with command, didn't save the file or forgot to reload it if it's in a cog
i got it
Lol, you mean an discord server? @abstract quarry
hosting
So try glitch, heroku!
It didn't work for me
Then watch tutorials
yeah its hard to test it
is it possible to send svg data as an image in an embed image or thumbnail?,
try it and see
How do you webhook?
-bots
@dawn geode
-play
@gilded plank help
can i make @dawn geode not respond to this server?
class Tile {
constructor(x, y, type) {
this.x = x
this.y = y
switch (type) {
case 'grass': this.i = assets.grass; break
case 'water': this.i = assets.water; break
}
}
update() {
image(this.i, this.x, this.y, size, size)
}
}
Inside the update() function, this.i is undefined (obviously). How do I make it work I am new to classes and my head hurts
@carmine echo add an i variable to your constructor
anyone got ideas on how to make a dashboard to for a discord.py bot?
Yeah I got that part solved and ready but the part of how to link both things together is not clear to me
you have 2 options
either run the webserver in the same program as your bot, so you can access your data from memory
or run a separate webserver, and have all your data in a database that accepts multiple connections
so you can access the database from the bot program, and from the webserver
i got myself a different vps and installed node v11.10.1
and now when i run my bot i get a deprecation warning where i cant find the part and what the new solution will be in the future.
Maybe someone here knows this one:
(node:29388) [DEP0112] DeprecationWarning: Socket.prototype._handle is deprecated
did you reinstall all your bots components/packages?
ye fresh npm install it is a completely fresh bot
dependencies:
"dependencies": {
"dblapi.js": "^2.3.0",
"discord.js": "github:discordjs/discord.js",
"node-opus": "^0.3.1",
"node-schedule": "^1.3.2",
"simple-youtube-api": "^5.1.1",
"sqlite3": "^4.0.6",
"ytdl-core": "^0.20.4"
}
did you reinstall each of them or just ran npm install?
npm install
try reinstalling each of them separately
will try it thanks
Tim that edit code not work
?
I ask you
Like
Option 1 = 10%
And if some one wright 1
It becomes option 1 =20%
and what did you do?
Message.edit
i mean... show what you did
Ok
the node-opus install gets me alot of warnings and some errors?
but no vulnerability
those warnings are normal, its about optional dependencies
oh sry i meant the stuff above the npm warnings is that normal aswell ?
ah yes, those are build warnings
oh alright didnt knew that thx ill continue 👍
message.channel.send("Hello").then((newMessage) => {newMessage.edit("Edited!");});
Something like this
after reinstalling every package by itself i still get the deprecation warning
then idk, maybe one of those packages didnt get updated for node 11.10
@pallid zinc that should work. i cant test now to confirm
alright i guess i ignore it then or downgrade node thank you
It's working
should be safe to ignore for now
But what if I want it to edit with 1
put 1 instead of edited?
if you want to wait for a message, you can use channel.awaitMessages or channel.createMessageCollector
Can you give example plz
Thanks buddy
hi fax tax
Hi tax fax
What files are you trying to ignore, @spare glen ?
its a couple of json files, where i have users money and etc, i wanna ignore them, so the users dont get different coins etc
Ok, what are their names?
ok
the ones with the underline
You already have a .gitignore, great
ye
add the following lines to it
for node_modules
comp.json
leveling.json
premium.json
welcome.json
not / at the end?
no
this picture basically explains it all lmao
but what i have shhould work right?
@amber fractal use a .md file...
You think that was my image?
k
Idk
Now in your console, do ```
git add .gitignore
git commit -m "Ignored comp, leveling, pet, premium and welcome JSON files"
I dont use any code editor like that
Your commit message can be different
It's better practice to not commit the git ignore and other things at once
Tarpergon its better than notepad 😬
You have to delete them first
so in my glitch project the files there wont be changed
No they will
I wouldnt know, I do all my coding in text
so i delete them, push, then remake them
I think thats right
@zealous veldt can confirm
help
git rm comp.json pet.json leveling.json premium.json welcome.jsom``` Should work iinm
You use glitch?
yeah
oh I never knew that was a command
You have console
@zealous veldt do you know if theres a way to unlink forks
hes tryna help u... dont get all nit picky
Especially if you know the "fix" yourself
git rm comp.json pet.json leveling.json premium.json welcome.json
Do i do this in my vs code console. Then done
yeah
what
Well
do it in terminal
Commit after you do that
fax ^^?
@spare glen I recommend reading this, maybe even bookmark it. https://www.digitalocean.com/community/tutorials/how-to-use-git-a-reference-guide
it will work in vs console
but
but theres no reason to make everything more complicated for no gains
@near aurora It does not matter what terminal emulator he does it in
What console he uses has no effect on this situation, you're making it more confusing
fair
^^
git rm comp.json pet.json leveling.json premium.json welcome.json
doesn't rm delete the files
rm = remove
No it doesnt
it removes them from git
now git commit -am "Idk something"
then push
git = git
yes
now, i do what
did you git rm?
then git add .
then git commit -m "hi"
yes
That should all work
then check your online repo to see if the files are there
ok, so if i wanted to, how do i get em back
so git un-rm comp.json pet.json leveling.json premium.json welcome.json
no
lol
just remove them from the gitignore
rm -f .gitignore
^ will delete the whole gitignore lol
noooooooooooooooooooooooooooooooooooooo
that deletes the files
bro are you trolling me now?
no
if you commit and push
back here
theyre always there
oh ok
they never get removed from your computer
They only get removed and ignored on remote
thats what git rm and .gitignore do
@unreal rampart You have already asked your question. Don't repost it
is this rewrite or async @unreal rampart
@near aurora async
Can I ask?
uh then Im pretty sure youre using python3.7
@near aurora ?
What?
NO
NO what
DONT DELETE THE GITIGNORE
it creates the role, but without the permissions
Why is Bloxlink down on every discords?
@near aurora
Yes that will work but theres a better way
Why is bloxlink down?
what better way
@unreal rampart just edit the perms one at a time idk
Well
WTF
just join the python discord server the invite is just python
@spare glen if, when youre commiting you type -a (so it would be - a -m or -am) you automatically add all the files
also you dont need to git push origin master
wdym -a
you can just type git push (I think)
wdym -a (-a -m -am)
so like you know how you add -m to make a commit message or when you rm you can type -R to recursive delete directories or -f to force delete
its the same thing, you can add -a to the end to make a commit message
but does what i showed u in the pic work, if it does then thats all
yes it works
ok, lemme try then
but if you can optimize work flow, why not do it
ok, so it sounds like you want to force removal?
but wouldnt that remove the 2 files
isnt that what you want to do?
i wanna ignore them, not delete them
okay then edit your .gitignore
to add whatever files you want to ignore
yeah
ok so it looks like those files are already ignored
Yes and that makes them ignored
idk, what do you want to do
no
you need to ask better questions
I cant give you the answer, cuz youll just forget right away
In fact, you do want to remove the files
i wanna ignore the files, and when i push, those files doesnt push with it
Ok then thats what you got
so i just push
but you also want to remove the files from git dont you?
idk, I thought thats what u wanted
make sure the files aren't in the source control and then push yes
so
so scroll up, we already gave you the command
no
Well its in there
confusion
But not that directly
Bro, we already told you how to git remove files
and then you came back with an error and told me you didnt want to remove them
@zealous veldt i need u
i'm a she and yes that is how you remove them, with git rm
git rm comp.json pet.json leveling.json premium.json welcome.json
if you're really having that much trouble you could just delete them through the site too i guess
yessssss
Now
You told me you wanted to remove them
so you would want to force removal
so did you read the error lol
yes it deletes the files
then it wont push the files
yes it wont push the files
so do what it says, use git rm -f
yes it won't push the files.. cause u are deleting them lol
and my glitch project will only change the files i push and not those files in gitignore
but wont it delete the files in my glitch project as well
i just wanna ignore them and not push them, but i want the files to be there in glitch
i ain't using heroku
tooooooooooooooooooo badddddddddddddddddddddddddddddd
ok no you've got this!
if you don't wanna remove the files, i think its git rm --cached
to just remove them from git
but not from ur hard disk
but thats not what he wants
but will teh files still me in my glitch project
he wants another remote which always mirrors github remote to include the files but for the github remote to not include them
not on github but in your project directory yes. make a backup of the files in case though cause i might be wrong
it should keep it on your computer but not put it on git
no no no ok
so
you know your project directory right?
on your local pc
it will keep the files there
but it will not publish to git
yes but do it like this git rm --cached <files>
oh ok thats how i normally do it
@elfin vale ok so it will not push to git, which means the files in glitch will not be changed (the files i choose to --cached)
what is glitch
something
youre fucking helpful
you could just do what i do when i'm being lazy lol
u too


