Skip to content

Commit f580968

Browse files
authored
Merge pull request #9 from ironswordX/main
Easily changeable command prefix
2 parents 0b9f1d2 + 8ac1a79 commit f580968

File tree

5 files changed

+7
-6
lines changed

5 files changed

+7
-6
lines changed

src/Bot/.config.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@
99
SDB_USER = ""
1010
SDB_PASS = ""
1111
SDB_NAMESPACE = ""
12-
SDB_DATABASE = ""
12+
SDB_DATABASE = ""
13+
COMMAND_PREFIX = "a!"

src/Bot/discord.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
# Set up intents and create the bot client
3131
intents = nextcord.Intents.default()
3232
intents.message_content = True
33-
client = commands.Bot(command_prefix="a!", intents=intents)
33+
client = commands.Bot(command_prefix=config.COMMAND_PREFIX, intents=intents)
3434

3535
# Create an aiohttp session
3636
session = aiohttp.ClientSession()

src/Bot/guilded_bot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
profiles_sample_rate=1.0,
2222
)
2323

24-
client = commands.Bot(command_prefix="a!")
24+
client = commands.Bot(command_prefix=config.COMMAND_PREFIX)
2525

2626

2727
client.help_command = None

src/Bot/nerimity_bot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
client = nerimity.Client(
1414
token=config.NERIMITY_TOKEN,
15-
prefix='a!',
15+
prefix=config.COMMAND_PREFIX,
1616
)
1717

1818
async def send_message(endpoint, params):
@@ -170,4 +170,4 @@ async def on_ready(client_info: dict):
170170
print(f"Logged in as {client.account.username}#{client.account.tag}")
171171
asyncio.create_task(iamup_loop())
172172

173-
client.run()
173+
client.run()

src/Bot/revolt_bot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
profiles_sample_rate=1.0,
2323
)
2424

25-
prefix = "gc!"
25+
prefix = config.COMMAND_PREFIX
2626

2727

2828
def get_endpoint(server: revolt.Server):

0 commit comments

Comments
 (0)