more cleanup
This commit is contained in:
parent
034cba69b0
commit
3c1dd474dd
1 changed files with 5 additions and 26 deletions
|
|
@ -661,7 +661,7 @@ async def rsgp(ctx, amount):
|
||||||
async def blog(ctx):
|
async def blog(ctx):
|
||||||
start_time = time.time()
|
start_time = time.time()
|
||||||
topic = ctx.message.content.split(" ", maxsplit=1)[1]
|
topic = ctx.message.content.split(" ", maxsplit=1)[1]
|
||||||
filename = "phixxy.com/blog/index.html"
|
filename = "phixxy.com/ai-blog/index.html"
|
||||||
with open(filename, 'r', encoding="utf-8") as f:
|
with open(filename, 'r', encoding="utf-8") as f:
|
||||||
html_data = f.read()
|
html_data = f.read()
|
||||||
current_time = time.time()
|
current_time = time.time()
|
||||||
|
|
@ -1056,15 +1056,13 @@ async def viewimages(ctx, message):
|
||||||
await ctx.send("Usage: !viewimages (enable|disable)")
|
await ctx.send("Usage: !viewimages (enable|disable)")
|
||||||
|
|
||||||
@bot.command()
|
@bot.command()
|
||||||
async def commandz(ctx, message):
|
async def enable_commands(ctx, message):
|
||||||
if "enable" in message:
|
if "disable" in message or "false" in message:
|
||||||
edit_channel_config(ctx.channel.id, "commands_enabled", True)
|
|
||||||
await ctx.send("Commands Enabled")
|
|
||||||
elif "disable" in message:
|
|
||||||
edit_channel_config(ctx.channel.id, "commands_enabled", False)
|
edit_channel_config(ctx.channel.id, "commands_enabled", False)
|
||||||
await ctx.send("Commands Disabled")
|
await ctx.send("Commands Disabled")
|
||||||
else:
|
else:
|
||||||
await ctx.send("Usage: !commandz (enable|disable)")
|
edit_channel_config(ctx.channel.id, "commands_enabled", True)
|
||||||
|
await ctx.send("Commands Enabled")
|
||||||
|
|
||||||
@bot.command()
|
@bot.command()
|
||||||
async def topic(ctx, channel_topic):
|
async def topic(ctx, channel_topic):
|
||||||
|
|
@ -1127,25 +1125,6 @@ async def personality(ctx):
|
||||||
edit_channel_config(ctx.channel.id, "personality", personality_type)
|
edit_channel_config(ctx.channel.id, "personality", personality_type)
|
||||||
await ctx.send("Personality changed to " + personality_type)
|
await ctx.send("Personality changed to " + personality_type)
|
||||||
|
|
||||||
@bot.command(pass_context=True)
|
|
||||||
async def disconnect(ctx):
|
|
||||||
voice_client = discord.utils.get(bot.voice_clients, guild=ctx.guild)
|
|
||||||
await voice_client.disconnect()
|
|
||||||
|
|
||||||
|
|
||||||
@bot.command(pass_context=True)
|
|
||||||
async def xplore_audio(ctx, arg):
|
|
||||||
voice_channel = get(ctx.guild.voice_channels, name=arg)
|
|
||||||
directory = "C:/Users/bottl/Music/xploreaudio/Recordings/"
|
|
||||||
filename = random.choice(os.listdir(directory))
|
|
||||||
print(filename)
|
|
||||||
voice_client = await voice_channel.connect()
|
|
||||||
audio_source = discord.FFmpegPCMAudio(directory+filename)
|
|
||||||
await ctx.send("Playing: " + filename)
|
|
||||||
voice_client.play(audio_source)
|
|
||||||
while voice_client.is_playing():
|
|
||||||
await asyncio.sleep(1)
|
|
||||||
await voice_client.disconnect()
|
|
||||||
|
|
||||||
@bot.command()
|
@bot.command()
|
||||||
async def change_model(ctx, model_choice='0'):
|
async def change_model(ctx, model_choice='0'):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue