Improve code readability

pull/2/head
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 Licensed under GPL 3.0
import sys, time, json
import discord
from discord import app_commands
import typing
from discord.ext import commands
import discord.utils
import time
import sys
BOOT_TIME = time.time()
@ -38,8 +38,12 @@ async def on_ready():
@client.tree.command(guild=discord.Object(id=813127962881818624), name="change_hostname")
@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',
'Debian', 'Debian based', 'Solus', 'Fedora', 'Ubuntu', 'Ubuntu Based', 'BSD', 'MacOS', 'Windows']):
async def distro(interaction: discord.Interaction, distro: typing.Literal[
'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
if distro == 'LFS':
user = interaction.user