add emojis and hide join/connect of the bot itself
This commit is contained in:
parent
aa63d3c781
commit
1f8688d8a6
1 changed files with 5 additions and 5 deletions
10
main.py
10
main.py
|
@ -38,7 +38,7 @@ async def on_ready():
|
||||||
print("[WARN] No voice channel " + voice_channel_id + " found!")
|
print("[WARN] No voice channel " + voice_channel_id + " found!")
|
||||||
if not debug_channel:
|
if not debug_channel:
|
||||||
print("[WARN] No text channel " + text_channel_id + " found!")
|
print("[WARN] No text channel " + text_channel_id + " found!")
|
||||||
await debug_channel.send('] ready.')
|
await debug_channel.send('] ready. :satellite_orbital:')
|
||||||
|
|
||||||
@bot.event
|
@bot.event
|
||||||
async def on_message(message):
|
async def on_message(message):
|
||||||
|
@ -52,7 +52,7 @@ async def on_message(message):
|
||||||
print('<' + message.author.nick + '> ' + message.content)
|
print('<' + message.author.nick + '> ' + message.content)
|
||||||
|
|
||||||
if message.content == '!help':
|
if message.content == '!help':
|
||||||
await message.channel.send('] radiobot commands: help, version, song')
|
await message.channel.send('] radiobot commands: help, version, song :star:')
|
||||||
|
|
||||||
if message.content == '!version':
|
if message.content == '!version':
|
||||||
await message.channel.send('] radiobot ' + bot_version + ' - python ' + os.environ['PYTHON_VERSION'] + ' - github.com/deflax/radiobot :purple_heart:')
|
await message.channel.send('] radiobot ' + bot_version + ' - python ' + os.environ['PYTHON_VERSION'] + ' - github.com/deflax/radiobot :purple_heart:')
|
||||||
|
@ -115,20 +115,20 @@ async def on_voice_state_update(member, before, after):
|
||||||
else:
|
else:
|
||||||
next_chan = str(after.channel.id)
|
next_chan = str(after.channel.id)
|
||||||
if next_chan == str(voice_channel_id):
|
if next_chan == str(voice_channel_id):
|
||||||
member_msg = str(member.nick) + ' enjoys! :star:'
|
member_msg = str(member.nick) + ' enjoys! :satellite:'
|
||||||
print('[INFO] ' + member_msg)
|
print('[INFO] ' + member_msg)
|
||||||
await debug_channel.send('] ' + member_msg)
|
await debug_channel.send('] ' + member_msg)
|
||||||
|
|
||||||
if member_ids > 0 and isConnected == False:
|
if member_ids > 0 and isConnected == False:
|
||||||
isConnected = True
|
isConnected = True
|
||||||
await debug_channel.send('] connecting to #' + voice_channel_idi + ' :sattelite:')
|
#await debug_channel.send('] connecting to #' + voice_channel_id + ' :satellite_orbital:')
|
||||||
voice_client = await voice_channel.connect()
|
voice_client = await voice_channel.connect()
|
||||||
player = voice_client.play(discord.FFmpegPCMAudio(source, **FFMPEG_OPTS))
|
player = voice_client.play(discord.FFmpegPCMAudio(source, **FFMPEG_OPTS))
|
||||||
return
|
return
|
||||||
|
|
||||||
if member_ids == 1 and isConnected == True:
|
if member_ids == 1 and isConnected == True:
|
||||||
isConnected = False
|
isConnected = False
|
||||||
await debug_channel.send('] disconnecting from #' + voice_channel_id + ' :sattelite_orbital:')
|
#await debug_channel.send('] disconnecting from #' + voice_channel_id + ' :satellite_orbital:')
|
||||||
for voice_client in bot.voice_clients:
|
for voice_client in bot.voice_clients:
|
||||||
await voice_client.disconnect()
|
await voice_client.disconnect()
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue