diff --git a/README.md b/README.md
index f3837a3..5ffd023 100644
--- a/README.md
+++ b/README.md
@@ -14,6 +14,7 @@ Cog Function
| leaver | **Incomplete** | Send a message in a channel when a user leaves the server
Not yet ported to v3 |
| lseen | **Alpha** | Track when a member was last online
Alpha release, please report bugs |
| reactrestrict | **Alpha** | Removes reactions by role per channel
A bit clunky, but functional |
+| sayurl | **Alpha** | Convert any URL into text and post to discord
No error checking and pretty spammy |
| secrethitler | **Incomplete** | Play the Secret Hitler game
Concept, no work done yet |
| stealemoji | **Alpha** | Steals any custom emoji it sees in a reaction
Some planned upgrades for server generation |
| werewolf | **Alpha** | Play the classic party game Werewolf within discord
Another massive project currently being developed, will be fully customizable |
diff --git a/sayurl/__init__.py b/sayurl/__init__.py
new file mode 100644
index 0000000..f4440e1
--- /dev/null
+++ b/sayurl/__init__.py
@@ -0,0 +1,5 @@
+from .sayurl import SayUrl
+
+
+def setup(bot):
+ bot.add_cog(SayUrl(bot))
diff --git a/sayurl/info..json b/sayurl/info..json
new file mode 100644
index 0000000..63c9589
--- /dev/null
+++ b/sayurl/info..json
@@ -0,0 +1,19 @@
+{
+ "author": [
+ "Bobloy"
+ ],
+ "bot_version": [
+ 3,
+ 0,
+ 0
+ ],
+ "description": "Convert any website into text and post it in chat",
+ "hidden": true,
+ "install_msg": "Thank you for installing SayUrl",
+ "requirements": [],
+ "short": "Convert URL to text",
+ "tags": [
+ "bobloy",
+ "tools"
+ ]
+}
\ No newline at end of file
diff --git a/sayurl/sayurl.py b/sayurl/sayurl.py
new file mode 100644
index 0000000..ce81409
--- /dev/null
+++ b/sayurl/sayurl.py
@@ -0,0 +1,56 @@
+import aiohttp
+import html2text
+from discord.ext import commands
+from redbot.core import Config, RedContext
+from redbot.core.bot import Red
+from redbot.core.utils.chat_formatting import pagify
+
+
+async def fetch_url(session, url):
+ with aiohttp.Timeout(20):
+ async with session.get(url) as response:
+ assert response.status == 200
+ return await response.text()
+
+
+class SayUrl:
+ """
+ V3 Cog Template
+ """
+
+ def __init__(self, bot: Red):
+ self.bot = bot
+ self.config = Config.get_conf(self, identifier=9811198108111121, force_registration=True)
+ default_global = {}
+ default_guild = {}
+
+ self.config.register_global(**default_global)
+ self.config.register_guild(**default_guild)
+
+ @commands.command()
+ async def sayurl(self, ctx: RedContext, url):
+ """
+ Converts a URL to something readable
+
+ :param url:
+ :return:
+ """
+
+ h = html2text.HTML2Text()
+ h.ignore_links = True
+ # h.ignore_images = True
+ h.images_to_alt = True
+
+ h.escape_snob = True
+ h.skip_internal_links = True
+ h.ignore_tables = True
+ h.single_line_break = True
+ h.mark_code = True
+ h.wrap_links = True
+ h.ul_item_mark = '-'
+
+ async with aiohttp.ClientSession() as session:
+ site = await fetch_url(session, url)
+
+ for page in pagify(h.handle(site)):
+ await ctx.send(page)