Adjust gti

This commit is contained in:
Dusty.P
2018-06-02 23:11:21 -08:00
parent 70535d0399
commit cc9a934fe6
2 changed files with 32 additions and 22 deletions
+6
View File
@@ -4,6 +4,7 @@ import asyncio
import discord
from discord.ext.commands.formatter import Paginator
from . import checks
import re
class Capturing(list):
@@ -64,6 +65,11 @@ def to_list_of_str(items, out: list=list(), level=1, recurse=0):
return out
def replace_text_ignorecase(in_str: str, old: str, new: str='') -> str:
re_replace = re.compile(re.escape(old), re.IGNORECASE)
return re_replace.sub(f'{new}', in_str)
def paginate(text, maxlen=1990):
paginator = Paginator(prefix='```py', max_size=maxlen+10)
if type(text) == list: