mirror of
https://github.com/brandons209/Red-bot-Cogs.git
synced 2024-06-03 11:05:18 +12:00
Merge pull request #15 from brandons209/memeify_fix
Adding pagify to memeify commands
This commit is contained in:
commit
5074ac937c
|
@ -1,4 +1,5 @@
|
||||||
from redbot.core import Config, commands
|
from redbot.core import Config, commands
|
||||||
|
from redbot.core.utils.chat_formatting import pagify
|
||||||
import re
|
import re
|
||||||
import random
|
import random
|
||||||
import string
|
import string
|
||||||
|
@ -34,6 +35,11 @@ class Memeify(commands.Cog):
|
||||||
else:
|
else:
|
||||||
return ctx.message.clean_content, True
|
return ctx.message.clean_content, True
|
||||||
|
|
||||||
|
async def __send_pagify(self, ctx, message):
|
||||||
|
pages = pagify(message)
|
||||||
|
for msg in pages:
|
||||||
|
await ctx.send(msg)
|
||||||
|
|
||||||
# ------------ bify ------------
|
# ------------ bify ------------
|
||||||
@commands.command()
|
@commands.command()
|
||||||
async def bify(self, ctx, *, content: str = None):
|
async def bify(self, ctx, *, content: str = None):
|
||||||
|
@ -42,7 +48,7 @@ class Memeify(commands.Cog):
|
||||||
if len(msg_c) != 2:
|
if len(msg_c) != 2:
|
||||||
await ctx.send("Where's the 🅱️essage?")
|
await ctx.send("Where's the 🅱️essage?")
|
||||||
else:
|
else:
|
||||||
await ctx.send(self.__bify(*msg_c))
|
await self.__send_pagify(ctx, self.__bify(*msg_c))
|
||||||
|
|
||||||
# takes a clean discord message and replaces all B's and
|
# takes a clean discord message and replaces all B's and
|
||||||
# first characters with :b:, unless the word is 1
|
# first characters with :b:, unless the word is 1
|
||||||
|
@ -86,7 +92,7 @@ class Memeify(commands.Cog):
|
||||||
if len(msg_c) != 2:
|
if len(msg_c) != 2:
|
||||||
await ctx.send("No message")
|
await ctx.send("No message")
|
||||||
else:
|
else:
|
||||||
await ctx.send(self.__french_pre_f(*msg_c))
|
await self.__send_pagify(ctx, self.__french_pre_f(*msg_c))
|
||||||
|
|
||||||
def __french_pre_f(self, french, cmd):
|
def __french_pre_f(self, french, cmd):
|
||||||
emoji_list = []
|
emoji_list = []
|
||||||
|
|
Loading…
Reference in a new issue