Prep for Red RC1 breaking change

pull/26/head
bobloy 6 years ago
parent b71a292940
commit 8935303f41

@ -1,6 +1,7 @@
import asyncio
import random
from datetime import datetime, timedelta
from typing import Any
import discord
from redbot.core import Config, checks, commands
@ -13,8 +14,10 @@ DEFAULT_MESSAGES = [
# "Example message 2. Each message is in quotes and separated by a comma"
]
Cog: Any = getattr(commands, "Cog", object)
class AnnounceDaily:
class AnnounceDaily(Cog):
"""
Send daily announcements
"""

@ -1,13 +1,16 @@
import asyncio
import re
from typing import Any
import discord
from redbot.core import Config, checks
from redbot.core import commands
from redbot.core.utils.chat_formatting import pagify, box
Cog: Any = getattr(commands, "Cog", object)
class CCRole:
class CCRole(Cog):
"""
Custom commands
Creates commands used to display text and adjust roles

@ -11,9 +11,12 @@ from chatter.chatterbot import ChatBot
from chatter.chatterbot.comparisons import levenshtein_distance
from chatter.chatterbot.response_selection import get_first_response
from chatter.chatterbot.trainers import ListTrainer
from typing import Any
Cog: Any = getattr(commands, "Cog", object)
class Chatter:
class Chatter(Cog):
"""
This cog trains a chatbot that will talk like members of your Guild
"""

@ -4,9 +4,12 @@ from redbot.core import Config
from redbot.core import commands
from redbot.core.bot import Red
from redbot.core.data_manager import cog_data_path
from typing import Any
Cog: Any = getattr(commands, "Cog", object)
class CogLint:
class CogLint(Cog):
"""
Automatically lint code in python codeblocks
"""

@ -2,9 +2,12 @@ import asyncio
import discord
from redbot.core import Config, checks, commands
from typing import Any
Cog: Any = getattr(commands, "Cog", object)
class ExclusiveRole:
class ExclusiveRole(Cog):
"""
Custom commands
Creates commands used to display text and adjust roles

@ -4,9 +4,12 @@ import discord
from redbot.core import Config, checks, commands
from redbot.core.bot import Red
from redbot.core.utils.chat_formatting import pagify
from typing import Any
Cog: Any = getattr(commands, "Cog", object)
class Flag:
class Flag(Cog):
"""
Set expiring flags on members
"""

@ -3,9 +3,12 @@ from discord.utils import get
from redbot.core import Config, checks, commands
from redbot.core.bot import Red
from typing import Any
Cog: Any = getattr(commands, "Cog", object)
class ForceMention:
class ForceMention(Cog):
"""
Mention the unmentionables
"""

@ -4,9 +4,12 @@ from random import randint
import discord
from redbot.core import Config, checks, commands
from redbot.core.data_manager import cog_data_path
from typing import Any
Cog: Any = getattr(commands, "Cog", object)
class Hangman:
class Hangman(Cog):
"""Lets anyone play a game of hangman with custom phrases"""
navigate = "🔼🔽"
letters = "🇦🇧🇨🇩🇪🇫🇬🇭🇮🇯🇰🇱🇲🇳🇴🇵🇶🇷🇸🇹🇺🇻🇼🇽🇾🇿"

@ -2,9 +2,12 @@ import discord
from redbot.core import Config, checks, commands
from redbot.core.commands import Context
from typing import Any
Cog: Any = getattr(commands, "Cog", object)
class Leaver:
class Leaver(Cog):
"""
Creates a goodbye message when people leave
"""

@ -2,9 +2,12 @@ import aiohttp
import discord
from bs4 import BeautifulSoup
from redbot.core import commands
from typing import Any
Cog: Any = getattr(commands, "Cog", object)
class LoveCalculator:
class LoveCalculator(Cog):
"""Calculate the love percentage for two users!"""
def __init__(self, bot):

@ -6,9 +6,12 @@ import discord
from redbot.core import Config
from redbot.core.bot import Red
from redbot.core import commands
from typing import Any
Cog: Any = getattr(commands, "Cog", object)
class LastSeen:
class LastSeen(Cog):
"""
Report when a user was last seen online
"""

@ -7,9 +7,12 @@ from random import choice
import discord
from redbot.core import commands, Config, bank
from redbot.core.bot import Red
from typing import Any
Cog: Any = getattr(commands, "Cog", object)
class Gardener:
class Gardener(Cog):
"""Gardener class"""
def __init__(self, user: discord.User, config: Config):

@ -7,9 +7,12 @@ from PIL import Image
from redbot.core import Config, commands
from redbot.core.bot import Red
from redbot.core.data_manager import cog_data_path
from typing import Any
Cog: Any = getattr(commands, "Cog", object)
class QRInvite:
class QRInvite(Cog):
"""
V3 Cog Template
"""

@ -4,6 +4,9 @@ import discord
from redbot.core import Config
from redbot.core import commands
from redbot.core.bot import Red
from typing import Any
Cog: Any = getattr(commands, "Cog", object)
class ReactRestrictCombo:
@ -31,7 +34,7 @@ class ReactRestrictCombo:
)
class ReactRestrict:
class ReactRestrict(Cog):
"""
Prevent specific roles from reacting to specific messages
"""

@ -5,9 +5,12 @@ import random
from redbot.core import bank
from redbot.core import commands
from redbot.core.data_manager import cog_data_path
from typing import Any
Cog: Any = getattr(commands, "Cog", object)
class RecyclingPlant:
class RecyclingPlant(Cog):
"""Apply for a job at the recycling plant!"""
def __init__(self, bot):

@ -3,9 +3,12 @@ import random
import discord
from redbot.core import commands
from typing import Any
Cog: Any = getattr(commands, "Cog", object)
class RPSLS:
class RPSLS(Cog):
"""Play Rock Paper Scissors Lizard Spock."""
weaknesses = {

@ -4,6 +4,9 @@ import html2text
from redbot.core import Config, commands
from redbot.core.bot import Red
from redbot.core.utils.chat_formatting import pagify
from typing import Any
Cog: Any = getattr(commands, "Cog", object)
async def fetch_url(session, url):
@ -13,7 +16,7 @@ async def fetch_url(session, url):
return await response.text()
class SayUrl:
class SayUrl(Cog):
"""
V3 Cog Template
"""

@ -1,8 +1,11 @@
import discord
from redbot.core import commands
from typing import Any
Cog: Any = getattr(commands, "Cog", object)
class SCP:
class SCP(Cog):
"""Look up SCP articles. Warning: Some of them may be too creepy or gruesome."""
def __init__(self, bot):

@ -4,6 +4,9 @@ import discord
from redbot.core import Config, commands
from redbot.core.bot import Red
from typing import Any
Cog: Any = getattr(commands, "Cog", object)
async def fetch_img(session, url):
@ -13,7 +16,7 @@ async def fetch_img(session, url):
return await response.read()
class StealEmoji:
class StealEmoji(Cog):
"""
This cog steals emojis and creates servers for them
"""

@ -5,9 +5,12 @@ import discord
from redbot.core import Config, checks, commands
from redbot.core.bot import Red
from redbot.core.utils.chat_formatting import pagify
from typing import Any
Cog: Any = getattr(commands, "Cog", object)
class Timerole:
class Timerole(Cog):
"""Add roles to users based on time on server"""
def __init__(self, bot: Red):

@ -4,9 +4,12 @@ import discord
from gtts import gTTS
from redbot.core import Config, commands
from redbot.core.bot import Red
from typing import Any
Cog: Any = getattr(commands, "Cog", object)
class TTS:
class TTS(Cog):
"""
Send Text-to-Speech messages
"""

@ -2,9 +2,12 @@ import codecs as c
import discord
from redbot.core import commands
from typing import Any
Cog: Any = getattr(commands, "Cog", object)
class Unicode:
class Unicode(Cog):
"""Encode/Decode Unicode characters!"""
def __init__(self, bot):

@ -8,9 +8,12 @@ from redbot.core import commands
from werewolf.builder import GameBuilder, role_from_name, role_from_alignment, role_from_category, role_from_id
from werewolf.game import Game
from redbot.core.utils.menus import menu, DEFAULT_CONTROLS
from typing import Any
Cog: Any = getattr(commands, "Cog", object)
class Werewolf:
class Werewolf(Cog):
"""
Base to host werewolf on a guild
"""

Loading…
Cancel
Save