Improve code readability
parent
25c3d57fe2
commit
21384b9a35
12
bot.py
12
bot.py
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue