Maybe fixing something?

release-1.0.0
DustyP 8 years ago
parent 5edc0c98ef
commit 077a9e66b3

@ -4,7 +4,6 @@ import asyncio
import discord import discord
from discord.ext.commands.formatter import Paginator as DannyPag from discord.ext.commands.formatter import Paginator as DannyPag
from src.imports import checks from src.imports import checks
from src.__main__ import Geeksbot
import re import re
import typing import typing
@ -221,7 +220,7 @@ class Paginator:
class Book: class Book:
def __init__(self, pag: Paginator, ctx: typing.Tuple[discord.Message, def __init__(self, pag: Paginator, ctx: typing.Tuple[discord.Message,
discord.TextChannel, discord.TextChannel,
Geeksbot, discord.ext.commands.Bot,
discord.Message]) -> None: discord.Message]) -> None:
if pag == Paginator(): if pag == Paginator():
raise RuntimeError('Cannot create a book out of an empty Paginator.') raise RuntimeError('Cannot create a book out of an empty Paginator.')
@ -248,6 +247,7 @@ class Book:
else: else:
await self._message.edit(content=self._pages[self._current_page], embed=None) await self._message.edit(content=self._pages[self._current_page], embed=None)
# noinspection PyUnresolvedReferences
for reaction in self._bot.book_emojis: for reaction in self._bot.book_emojis:
try: try:
await self._message.add_reaction(reaction) await self._message.add_reaction(reaction)

Loading…
Cancel
Save