diff --git a/botlog.txt b/botlog.txt index e69de29..6897ca8 100644 --- a/botlog.txt +++ b/botlog.txt @@ -0,0 +1,11 @@ + +Bot Online from Thu Oct 8 23:29:38 2020 +Bot Online from Thu Oct 8 23:36:04 2020 +Bot Online from Thu Oct 8 23:40:11 2020 +Bot Online from Thu Oct 8 23:41:01 2020 +Connected to General Thu Oct 8 23:46:18 2020 +Connected to General Fri Oct 9 00:37:21 2020 +Left the General channel + Fri Oct 9 00:37:27 2020 +Bot Online from Fri Oct 9 01:57:28 2020 +Bot Online from Fri Oct 9 02:11:31 2020 \ No newline at end of file diff --git a/discordsystem.log b/discordsystem.log index e69de29..f6347a8 100644 --- a/discordsystem.log +++ b/discordsystem.log @@ -0,0 +1,8 @@ +2020-10-09 02:11:27,977:INFO:discord.client: logging in using static token +2020-10-09 02:11:29,017:INFO:discord.gateway: Shard ID None has sent the IDENTIFY payload. +2020-10-09 02:11:29,422:INFO:discord.gateway: Shard ID None has connected to Gateway: ["gateway-prd-main-n391",{"micros":82901,"calls":["discord-sessions-prd-2-10",{"micros":74233,"calls":["start_session",{"micros":46083,"calls":["api-prd-main-wfmr",{"micros":43826,"calls":["get_user",{"micros":2579},"add_authorized_ip",{"micros":1574},"get_guilds",{"micros":13237},"coros_wait",{"micros":1}]}]},"guilds_connect",{"micros":29,"calls":[]},"presence_connect",{"micros":2,"calls":[]}]}]}] (Session ID: 18a05bdf03a156e117dd0bff39d8605e). +2020-10-09 02:21:11,270:INFO:discord.client: Received signal to terminate bot and event loop. +2020-10-09 02:21:11,270:INFO:discord.client: Cleaning up tasks. +2020-10-09 02:21:11,270:INFO:discord.client: Cleaning up after 1 tasks. +2020-10-09 02:21:11,305:INFO:discord.client: All tasks finished cancelling. +2020-10-09 02:21:11,305:INFO:discord.client: Closing the event loop. diff --git a/helper.py b/helper.py index e21b17e..ff101a2 100644 --- a/helper.py +++ b/helper.py @@ -53,6 +53,7 @@ def spank(url): poffset = (1200,340) background.paste(profile, poffset) background.save('spank.jpg') - + + #spank('https://cdn.discordapp.com/avatars/651715103313362944/d8b5f4ee9746238ef82dd5a7a10a575b.webp') \ No newline at end of file diff --git a/pybot.py b/pybot.py index adf0f9d..7963335 100644 --- a/pybot.py +++ b/pybot.py @@ -27,6 +27,7 @@ from dotenv import load_dotenv from helper import worthless, slap, spank from sentimentAnalyzer import sentiment +from wiki import sendWiki load_dotenv() ''' @@ -96,11 +97,13 @@ async def yo(ctx): embed.add_field(name='`gali`', value='Get bestowed with a random gali',inline=True) embed.add_field(name='`inv`', value='Generate an Invite to this Server',inline=True) embed.add_field(name='`poke`', value='Use this command as ;poke@mention to poke someone',inline=True) - embed.add_field(name='`worth`', value='Use as ;worth @mention',inline=True) + embed.add_field(name='`worth`', value='Use as ;worth name(not mention)',inline=True) embed.add_field(name='`kami`', value='kami',inline=True) - embed.add_field(name='`gibslap`', value='use as ;slap @mention',inline=True) + embed.add_field(name='`gibslap`', value='use as ;gibslap @mention',inline=True) embed.add_field(name='`toss`', value='do a coin flip',inline=True) embed.add_field(name='`gibspank`', value='use as ;gibspank @mention',inline=True) + embed.add_field(name='`poll`', value='Seperate two options with **or**',inline=True) + embed.add_field(name='`wiki`', value='Get 3 sentence or less summary of a topic',inline=True) embed.add_field(name='`owner`', value='Notify the owner of this Bot',inline=True) embed.set_footer(text='Have a nice day!😄') await ctx.send(embed = embed) @@ -169,6 +172,12 @@ async def gibslap(ctx, *, avamember : discord.Member=None): #userAvatarUrl = avamember.avatar_url slap(avamember.avatar_url) await ctx.send(file=discord.File('slap.jpg')) +''' +This command does not work for some reasons, gets stuck at "getting user dp" +update it dosent "get stuck", it makes the meme but fails to send it for some reason +UPDATE: nevermind, the problem was not with the code it was me, extension should have been .jpg +and i've been using .png +''' @client.command() async def gibspank(ctx, *, avamember : discord.Member=None): @@ -176,19 +185,19 @@ async def gibspank(ctx, *, avamember : discord.Member=None): spank(avamember.avatar_url) await ctx.send(file=discord.File('spank.jpg')) -@client.command(aliases=['sentiment']) -async def senti(ctx): - lastmessageID = ctx.channel.last_message_id - msg = await ctx.fetch_message(lastmessageID) - print(msg.content) - lastmsg = sentiment(msg.content) - print(lastmsg) - if lastmsg == 1: - await ctx.send_reaction("👍") - if lastmsg == 0: - await ctx.send_reaction("👌") - else: - await ctx.send_reaction("👎") +# @client.command(aliases=['sentiment']) +# async def senti(ctx): +# lastmessageID = ctx.channel.last_message_id +# msg = await ctx.fetch_message(lastmessageID) +# print(msg.content) +# lastmsg = sentiment(msg.content) +# print(lastmsg) +# if lastmsg == 1: +# await ctx.send_reaction("👍") +# if lastmsg == 0: +# await ctx.send_reaction("👌") +# else: +# await ctx.send_reaction("👎") @client.command(aliases=['pl']) @@ -207,25 +216,24 @@ async def poll(ctx,*,msg,avamember : discord.Member=None): await message_.add_reaction("❎") await ctx.message.delete() +@client.command(aliases=['Wi']) +async def wiki(ctx, usr: str): + queryTerm = usr + result = sendWiki(queryTerm) + embed = discord.Embed( + title = queryTerm, + description = result, + colour = 0xce65dc + ) + await ctx.send(embed = embed) + await ctx.message.delete() + -''' - This command does not work for some reasons, gets stuck at "getting user dp" - update it dosent "get stuck", it makes the meme but fails to send it for some reason - UPDATE: nevermind, the problem was not with the code it was me, extension should have been .jpg - and i've been using .png -''' #New stuff ''' -@client.command() -async def uptime(ctx): - today = datetime.now().strftime("%x") - uptime = (today - starttime) - print(uptime) - print("beep boop this part ran") - await ctx.send(f'AraonJR is up for {uptime}') diff --git a/requirements.txt b/requirements.txt index 33dd449..698f3ea 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,35 +1,107 @@ aiohttp==3.6.2 +altgraph==0.17 +appdirs==1.4.4 +args==0.1.0 async-timeout==3.0.1 asyncio==3.4.3 -attrs==20.2.0 +attrs==19.3.0 +beautifulsoup4==4.9.1 certifi==2020.6.20 -cffi==1.14.3 +cffi==1.14.0 chardet==3.0.4 click==7.1.2 -discord.py==1.4.1 +clint==0.5.1 +colorama==0.4.3 +configparser==5.0.0 +crayons==0.3.1 +cryptography==2.9.2 +cycler==0.10.0 +dearpygui==0.1.0b10 +decorator==4.4.2 +dhooks==1.1.4 +discord.py==1.5.0 +distlib==0.3.0 +facebook-sdk==3.1.0 +Faker==4.1.2 +filelock==3.0.12 +Flask==1.1.2 +future==0.18.2 +get-stick-bugged-lol==0.0.1 googletrans==3.0.0 h11==0.9.0 h2==3.2.0 hpack==3.0.0 -hstspreload==2020.9.23 +hstspreload==2020.10.6 httpcore==0.9.1 httpx==0.13.3 hyperframe==5.2.0 idna==2.10 -joblib==0.16.0 -multidict==4.7.6 +imageio==2.9.0 +imageio-ffmpeg==0.4.2 +itsdangerous==1.1.0 +Jinja2==2.11.2 +joblib==0.17.0 +kiwisolver==1.2.0 +MarkupSafe==1.1.1 +matplotlib==3.2.1 +MouseInfo==0.1.3 +moviepy==1.0.3 +multidict==4.7.5 +mysql-connector-python==8.0.20 +networkx==2.4 nltk==3.5 +numpy==1.19.1 +opencv-python==4.2.0.34 +pandas==1.0.3 +pefile==2019.4.18 Pillow==7.2.0 +pipenv==2018.11.26 +praw==7.1.0 +prawcore==1.4.0 +proglog==0.1.9 +py-stackexchange==2.2.7 +PyAutoGUI==0.9.50 pycparser==2.20 +pygame==1.9.6 +PyGetWindow==0.0.8 +PyInstaller==3.6 +pylsd-nova==1.0.0 +PyMsgBox==1.0.8 PyNaCl==1.3.0 -python-dotenv==0.14.0 -regex==2020.7.14 +pyparsing==2.4.7 +pyperclip==1.8.0 +PyRect==0.1.4 +PyScreeze==0.1.26 +python-dateutil==2.8.1 +python-dotenv==0.13.0 +PyTweening==1.0.3 +pytz==2020.1 +PyWavelets==1.1.1 +pywin32-ctypes==0.2.0 +regex==2020.9.27 requests==2.24.0 rfc3986==1.4.0 -six==1.15.0 +scikit-image==0.17.2 +scipy==1.4.1 +selenium==3.141.0 +six==1.14.0 sniffio==1.1.0 +socli==5.7 +soupsieve==2.0.1 +text-unidecode==1.3 textblob==0.15.3 -tqdm==4.49.0 +tifffile==2020.6.3 +tkintertable==1.3.2 +tqdm==4.48.2 +update-checker==0.17 urllib3==1.25.10 -yarl==1.5.1 -youtube-dl==2020.9.20 +urwid==2.1.0 +virtualenv==20.0.20 +virtualenv-clone==0.5.4 +webdriver-manager==3.2.2 +websocket-client==0.57.0 +websockets==8.1 +Werkzeug==1.0.1 +wikipedia==1.4.0 +yarl==1.4.2 +youtube-dl==2020.5.8 diff --git a/wiki.py b/wiki.py new file mode 100644 index 0000000..ff2f64b --- /dev/null +++ b/wiki.py @@ -0,0 +1,12 @@ +import time +import wikipedia + +def sendWiki(text): + try: + sh = wikipedia.summary(text, sentences = 3) + pgContent = sh + except: + pgContent = 'Search term is too broad, be more specific ' + + return pgContent +