mirror of
https://github.com/NohamR/TransmissionBot.git
synced 2025-05-24 00:48:59 +00:00
fix netifaces
This commit is contained in:
parent
d93b308a23
commit
3138f283c5
14
bot.py
14
bot.py
@ -2757,9 +2757,10 @@ async def print_help(message, content="", compact_output=(OUTPUT_MODE == OutputM
|
||||
async def help_cmd(context, *, content=""):
|
||||
await print_help(context.message, content)
|
||||
|
||||
"""
|
||||
async def print_info(message, content=""):
|
||||
import requests as req
|
||||
from netifaces import interfaces, ifaddresses, AF_INET
|
||||
# from netifaces import interfaces, ifaddresses, AF_INET
|
||||
|
||||
async with message.channel.typing():
|
||||
# get public IP address
|
||||
@ -2868,11 +2869,12 @@ async def print_info(message, content=""):
|
||||
await message.channel.send(embed=embed)
|
||||
|
||||
return
|
||||
"""
|
||||
|
||||
@client.command(name='info', pass_context=True)
|
||||
async def info_cmd(context, *, content=""):
|
||||
if await CommandPrecheck(context.message, whitelist=CONFIG['owner_user_ids']):
|
||||
await print_info(context.message)
|
||||
# @client.command(name='info', pass_context=True)
|
||||
# async def info_cmd(context, *, content=""):
|
||||
# if await CommandPrecheck(context.message, whitelist=CONFIG['owner_user_ids']):
|
||||
# await print_info(context.message)
|
||||
|
||||
@client.command(name='test', pass_context=True)
|
||||
async def test(context, *, content=""):
|
||||
@ -2963,7 +2965,7 @@ dmCommands = {
|
||||
'notifications': {'alias':['n'], 'cmd':toggle_notifications},
|
||||
'set-repeat-timeout': {'alias':['timeout'], 'cmd':set_repeat_timeout},
|
||||
'set-repeat-freq': {'alias':['freq'], 'cmd':set_repeat_freq},
|
||||
'info': {'alias':[], 'cmd':print_info}
|
||||
# 'info': {'alias':[], 'cmd':print_info}
|
||||
}
|
||||
|
||||
client.run(CONFIG['bot_token'])
|
||||
|
@ -1,6 +1,5 @@
|
||||
aiohttp==3.8.6
|
||||
discord.py==2.3.2
|
||||
netifaces==0.11.0
|
||||
pytz==2023.3.post1
|
||||
Requests==2.31.0
|
||||
transmissionrpc==0.11
|
||||
|
Loading…
x
Reference in New Issue
Block a user