mirror of
https://github.com/uhIgnacio/EmoteManager.git
synced 2024-08-15 02:23:13 +00:00
Merge branch 'master' into metrics
This commit is contained in:
commit
cce4a23c35
13 changed files with 25 additions and 143 deletions
16
bot.py
16
bot.py
|
@ -1,19 +1,7 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
# © 2018–2020 io mintz <io@mintz.cc>
|
||||
#
|
||||
# Emote Manager is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# Emote Manager is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with Emote Manager. If not, see <https://www.gnu.org/licenses/>.
|
||||
# © lambda#0987 <lambda@lambda.dance>
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
import base64
|
||||
import logging
|
||||
|
|
|
@ -1,17 +1,5 @@
|
|||
# © 2018–2020 io mintz <io@mintz.cc>
|
||||
#
|
||||
# Emote Manager is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# Emote Manager is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with Emote Manager. If not, see <https://www.gnu.org/licenses/>.
|
||||
# © lambda#0987 <lambda@lambda.dance>
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
import asyncio
|
||||
import cgi
|
||||
|
@ -441,6 +429,7 @@ class Emotes(commands.Cog):
|
|||
return await validate(self.http.get(url))
|
||||
|
||||
async def create_emote_from_bytes(self, context, name, image_data: bytes, *, reason=None):
|
||||
if len(image_data) > 256 * 1024:
|
||||
image_data = await utils.image.resize_in_subprocess(image_data)
|
||||
if reason is None:
|
||||
reason = 'Created by ' + utils.format_user(context.author)
|
||||
|
|
16
cogs/meta.py
16
cogs/meta.py
|
@ -1,17 +1,5 @@
|
|||
# © 2018–2020 io mintz <io@mintz.cc>
|
||||
#
|
||||
# Emote Manager is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# Emote Manager is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with Emote Manager. If not, see <https://www.gnu.org/licenses/>.
|
||||
# © lambda#0987 <lambda@lambda.dance>
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
import contextlib
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
© 2018–2020 lambda#0987
|
||||
© lambda#0987 <lambda@lambda.dance>
|
||||
|
||||
Emote Manager is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#!/usr/bin/env python3
|
||||
# © lambda#0987 <lambda@lambda.dance>
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
from .misc import *
|
||||
from . import archive
|
||||
|
|
|
@ -1,17 +1,5 @@
|
|||
# © 2018–2020 io mintz <io@mintz.cc>
|
||||
#
|
||||
# Emote Manager is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# Emote Manager is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with Emote Manager. If not, see <https://www.gnu.org/licenses/>.
|
||||
# © lambda#0987 <lambda@lambda.dance>
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
import asyncio
|
||||
import collections
|
||||
|
|
|
@ -1,17 +1,5 @@
|
|||
# © 2018–2020 io mintz <io@mintz.cc>
|
||||
#
|
||||
# Emote Manager is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# Emote Manager is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with Emote Manager. If not, see <https://www.gnu.org/licenses/>.
|
||||
# © lambda#0987 <lambda@lambda.dance>
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
import functools
|
||||
from discord.ext.commands import BadArgument
|
||||
|
|
|
@ -1,17 +1,5 @@
|
|||
# © 2018–2020 io mintz <io@mintz.cc>
|
||||
#
|
||||
# Emote Manager is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# Emote Manager is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with Emote Manager. If not, see <https://www.gnu.org/licenses/>.
|
||||
# © lambda#0987 <lambda@lambda.dance>
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
import re
|
||||
|
||||
|
|
|
@ -1,17 +1,5 @@
|
|||
# © 2018–2020 io mintz <io@mintz.cc>
|
||||
#
|
||||
# Emote Manager is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# Emote Manager is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with Emote Manager. If not, see <https://www.gnu.org/licenses/>.
|
||||
# © lambda#0987 <lambda@lambda.dance>
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
import utils
|
||||
import asyncio
|
||||
|
|
|
@ -1,17 +1,5 @@
|
|||
# © 2018–2020 io mintz <io@mintz.cc>
|
||||
#
|
||||
# Emote Manager is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# Emote Manager is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with Emote Manager. If not, see <https://www.gnu.org/licenses/>.
|
||||
# © lambda#0987 <lambda@lambda.dance>
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
import asyncio
|
||||
import base64
|
||||
|
|
|
@ -1,17 +1,5 @@
|
|||
# © 2018–2020 io mintz <io@mintz.cc>
|
||||
#
|
||||
# Emote Manager is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# Emote Manager is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with Emote Manager. If not, see <https://www.gnu.org/licenses/>.
|
||||
# © lambda#0987 <lambda@lambda.dance>
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
"""various utilities for use within the bot"""
|
||||
|
||||
|
|
|
@ -1,17 +1,5 @@
|
|||
# © 2018–2020 io mintz <io@mintz.cc>
|
||||
#
|
||||
# Emote Manager is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# Emote Manager is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with Emote Manager. If not, see <https://www.gnu.org/licenses/>.
|
||||
# © lambda#0987 <lambda@lambda.dance>
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
import asyncio
|
||||
import contextlib
|
||||
|
|
Loading…
Reference in a new issue