Improve code readability

master
BodgeMaster 2023-01-13 19:34:04 +01:00
parent 25c3d57fe2
commit 21384b9a35
1 changed files with 8 additions and 4 deletions

12
bot.py
View File

@ -2,13 +2,13 @@
# Code revised by BodgeMaster # Code revised by BodgeMaster
# Code Licensed under GPL 3.0 # Code Licensed under GPL 3.0
import sys, time, json
import discord import discord
from discord import app_commands from discord import app_commands
import typing import typing
from discord.ext import commands from discord.ext import commands
import discord.utils import discord.utils
import time
import sys
BOOT_TIME = time.time() BOOT_TIME = time.time()
@ -38,8 +38,12 @@ async def on_ready():
@client.tree.command(guild=discord.Object(id=813127962881818624), name="change_hostname") @client.tree.command(guild=discord.Object(id=813127962881818624), name="change_hostname")
@app_commands.describe(distro='Assign yourself a role') @app_commands.describe(distro='Assign yourself a role')
async def distro(interaction: discord.Interaction, distro: typing.Literal['LFS', 'Kiss', 'Gentoo', 'Void', 'NixOS', 'Alpine', 'Arch', 'Arch-based', 'Red Hat', 'Bedrock', 'SuSE Based', 'OpenSuSE', async def distro(interaction: discord.Interaction, distro: typing.Literal[
'Debian', 'Debian based', 'Solus', 'Fedora', 'Ubuntu', 'Ubuntu Based', 'BSD', 'MacOS', 'Windows']): 'LFS', 'Kiss', 'Gentoo', 'Void', 'NixOS', 'Alpine',
'Arch', 'Arch-based', 'Red Hat', 'Bedrock', 'SuSE Based',
'OpenSuSE', 'Debian', 'Debian based', 'Solus', 'Fedora',
'Ubuntu', 'Ubuntu Based', 'BSD', 'MacOS', 'Windows'
]):
user = interaction.user user = interaction.user
if distro == 'LFS': if distro == 'LFS':
user = interaction.user user = interaction.user