Get bot token from command line
parent
afa068cf52
commit
6e4674953e
|
@ -2,18 +2,18 @@
|
||||||
|
|
||||||
A bot written for the Linux General Discord Server
|
A bot written for the Linux General Discord Server
|
||||||
|
|
||||||
### How to run
|
### Setup
|
||||||
|
|
||||||
- Install the necessary packages:
|
- Install the necessary packages:
|
||||||
```sh
|
```sh
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
```
|
```
|
||||||
|
|
||||||
- On the last line, replace `TOKEN` with your bot token
|
### Running
|
||||||
|
|
||||||
- Then, run the `bot.py`file:
|
- Run the `bot.py`file passing the bot token as argument:
|
||||||
```sh
|
```sh
|
||||||
python3 bot.py
|
python3 bot.py TOKEN_HERE
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
6
bot.py
6
bot.py
|
@ -8,7 +8,7 @@ import typing
|
||||||
from discord.ext import commands
|
from discord.ext import commands
|
||||||
import discord.utils
|
import discord.utils
|
||||||
import time
|
import time
|
||||||
from sys import platform
|
import sys
|
||||||
|
|
||||||
BOOT_TIME = time.time()
|
BOOT_TIME = time.time()
|
||||||
|
|
||||||
|
@ -190,10 +190,10 @@ async def report_message(interaction: discord.Interaction, message: discord.Mess
|
||||||
async def status(interaction: discord.Interaction):
|
async def status(interaction: discord.Interaction):
|
||||||
embed = discord.Embed(title='System Stats')
|
embed = discord.Embed(title='System Stats')
|
||||||
embed.description = f"""Uptime: {seconds_elapsed()}
|
embed.description = f"""Uptime: {seconds_elapsed()}
|
||||||
System: {platform}"""
|
System: {sys.platform}"""
|
||||||
url_view = discord.ui.View()
|
url_view = discord.ui.View()
|
||||||
await interaction.response.send_message(embed=embed, view=url_view)
|
await interaction.response.send_message(embed=embed, view=url_view)
|
||||||
|
|
||||||
|
|
||||||
client.tree.sync()
|
client.tree.sync()
|
||||||
client.run('TOKEN')
|
client.run(sys.argv[1])
|
||||||
|
|
Loading…
Reference in New Issue