Make get_loeh private
This commit is contained in:
4
bot.py
4
bot.py
@@ -53,7 +53,7 @@ if 'LIBOPUS' in os.environ and not len(os.environ['LIBOPUS']) == 0:
|
|||||||
discord.opus.load_opus(os.environ['LIBOPUS'])
|
discord.opus.load_opus(os.environ['LIBOPUS'])
|
||||||
|
|
||||||
|
|
||||||
async def get_loeh(guild: discord.Guild) -> Optional[discord.Member]:
|
async def _get_loeh(guild: discord.Guild) -> Optional[discord.Member]:
|
||||||
try:
|
try:
|
||||||
return await guild.fetch_member(LOEH_ID)
|
return await guild.fetch_member(LOEH_ID)
|
||||||
except discord.NotFound:
|
except discord.NotFound:
|
||||||
@@ -78,7 +78,7 @@ async def on_message(message: discord.Message):
|
|||||||
await message.channel.send('429: Too many requests')
|
await message.channel.send('429: Too many requests')
|
||||||
return
|
return
|
||||||
last_och = t
|
last_och = t
|
||||||
loeh = await get_loeh(message.guild)
|
loeh = await _get_loeh(message.guild)
|
||||||
if loeh is None:
|
if loeh is None:
|
||||||
await message.channel.send('404: Löh not found!')
|
await message.channel.send('404: Löh not found!')
|
||||||
elif loeh.voice is None:
|
elif loeh.voice is None:
|
||||||
|
|||||||
Reference in New Issue
Block a user