Skip to content

Commit 4a6f82a

Browse files
authored
Merge pull request #405 from KoalaBotUK/feature/verify-api
Feature/verify api
2 parents 44492c8 + 0f8d07b commit 4a6f82a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+867
-476
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,13 @@ jobs:
5151
python -m pip install --upgrade pip
5252
pip install flake8 pytest
5353
pip install pytest-cov
54-
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
54+
if [ -f requirements.txt ]; then
55+
pip install -r requirements.txt;
56+
fi
57+
58+
if [ "$RUNNER_OS" == "Linux" ]; then
59+
pip install pysqlcipher3==1.2.0;
60+
fi
5561
5662
- name: Lint with flake8
5763
run: |

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,16 @@ All notable changes to KoalaBot will be documented in this file. A lot of these
33
administrators
44

55
## [Unreleased]
6+
### BaseCog
7+
- Add backend API
8+
### RFR
9+
- Add backend API
610
### Verify
711
- Added new commands `verifyBlacklist` and `verifyBlacklistRemove` for blacklisting a given user from being verified
812
- Updated look of verify emails
913
- made email verification case insensitive
1014
- Added optimisations for verified roles
15+
- Add backend API
1116

1217
## [0.6.0] - 01-01-2023
1318
- Upgraded to discord.py 2.1.0

koala/cogs/__init__.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
from .base import BaseCog
2-
31
from .announce import Announce
4-
from .twitch_alert import TwitchAlert
2+
from .base import BaseCog
53
from .colour_role import ColourRole
64
from .intro_cog import IntroCog
75
from .react_for_role import ReactForRole
86
from .text_filter import TextFilter
7+
from .twitch_alert import TwitchAlert
98
from .verification import Verification
109
from .voting import Voting

koala/cogs/announce/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
from . import utils, db, log, models
2+
from .announce_message import AnnounceMessage
23
from .cog import Announce, setup
3-
from .announce_message import AnnounceMessage

koala/cogs/announce/db.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from koala.db import session_manager
66
from .models import GuildUsage
77

8+
89
# Libs
910

1011

koala/cogs/base/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
from . import cog
21
from . import api
2+
from . import cog
33
from .cog import BaseCog
44

55

koala/cogs/base/api.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
# Futures
22
# Built-in/Generic Imports
33
# Libs
4-
from http.client import CREATED, OK, BAD_REQUEST
5-
from aiohttp import web
4+
from http.client import CREATED
5+
66
import discord
7+
from aiohttp import web
78
from discord.ext.commands import Bot
89

10+
from koala.rest.api import parse_request, build_response
11+
from koala.utils import convert_iso_datetime
912
# Own modules
1013
from . import core
1114
from .log import logger
12-
from koala.rest.api import parse_request, build_response
13-
from koala.utils import convert_iso_datetime
1415

1516
# Constants
1617
BASE_ENDPOINT = 'base'
@@ -187,7 +188,7 @@ async def post_disable_extension(self, guild_id, koala_ext):
187188
"""
188189
Disables a koala extension onto a server
189190
:param guild_id: id for the Discord guild
190-
:param koala_extension: name of the extension
191+
:param koala_ext: name of the extension
191192
:return:
192193
"""
193194
try:

koala/cogs/base/cog.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414
import discord
1515
from discord import app_commands
1616
from discord.ext import commands, tasks
17-
1817
# Own modules
1918
from discord.ext.commands import BadArgument
20-
from koala.utils import convert_iso_datetime
2119

2220
import koalabot
21+
from koala.utils import convert_iso_datetime
2322
from . import core
24-
from .utils import AUTO_UPDATE_ACTIVITY_DELAY
2523
from .log import logger
24+
from .utils import AUTO_UPDATE_ACTIVITY_DELAY
25+
2626

2727
# Constants
2828

koala/cogs/base/core.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@
55
from discord.ext.commands import Bot
66

77
import koalabot
8+
from koala.db import assign_session, get_all_available_guild_extensions, get_enabled_guild_extensions, \
9+
give_guild_extension, remove_guild_extension
810
from . import db
911
from .log import logger
1012
from .models import ScheduledActivities
11-
from koala.db import assign_session, get_all_available_guild_extensions, get_enabled_guild_extensions, give_guild_extension, remove_guild_extension
1213
from .utils import DEFAULT_ACTIVITY, activity_eq, list_ext_embed
1314

1415
# Constants

koala/cogs/base/models.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
from discord import ActivityType
55
from sqlalchemy import Column, Integer, String, TIMESTAMP, Enum
66

7+
from koala.db import setup
78
# Own modules
89
from koala.models import mapper_registry, BaseModel
9-
from koala.db import setup
10+
1011

1112
# Constants
1213

0 commit comments

Comments
 (0)