forked from HoloTech/subathon-tracker-bot
Compare commits
2 Commits
ef7789dc9c
..
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 2f2582d0ae | |||
| a107292233 |
+1
-4
@@ -3,13 +3,10 @@
|
||||
url = https://git.thewisewolf.dev/HoloTech/psqlmapper.git
|
||||
[submodule "src/modules/subathon"]
|
||||
path = src/modules/subathon
|
||||
url = https://git.thewisewolf.dev/CarmiCoven/lilac-subathon-plugin.git
|
||||
url = https://git.thewisewolf.dev/HoloTech/twitch-subathon-plugin.git
|
||||
[submodule "src/modules/tracker"]
|
||||
path = src/modules/tracker
|
||||
url = https://git.thewisewolf.dev/HoloTech/twitch-eventtracker-plugin.git
|
||||
[submodule "src/modules/profiles"]
|
||||
path = src/modules/profiles
|
||||
url = https://git.thewisewolf.dev/HoloTech/profiles-plugin.git
|
||||
[submodule "src/modules/exec"]
|
||||
path = src/modules/exec
|
||||
url = https://git.thewisewolf.dev/HoloTech/exec-plugin.git
|
||||
|
||||
@@ -17,18 +17,6 @@ BEGIN
|
||||
END;
|
||||
$$ language 'plpgsql';
|
||||
|
||||
CREATE OR REPLACE FUNCTION current_module_version(module_name TEXT)
|
||||
RETURNS INTEGER
|
||||
AS $$
|
||||
SELECT
|
||||
to_version
|
||||
FROM version_history
|
||||
WHERE
|
||||
component = $1
|
||||
ORDER BY _timestamp DESC
|
||||
LIMIT 1;
|
||||
$$ LANGUAGE SQL;
|
||||
|
||||
CREATE TABLE app_config(
|
||||
appname TEXT PRIMARY KEY,
|
||||
created_at TIMESTAMPTZ NOT NULL DEFAULT now()
|
||||
|
||||
@@ -4,12 +4,9 @@ if TYPE_CHECKING:
|
||||
from meta import Bot
|
||||
|
||||
|
||||
async def twitch_setup(bot: "Bot"):
|
||||
async def twitch_setup(bot: 'Bot'):
|
||||
# Import and run setup methods from each module
|
||||
from . import profiles, tracker, subathon, exec, yarn
|
||||
|
||||
from . import profiles, tracker, subathon
|
||||
await profiles.twitch_setup(bot)
|
||||
await tracker.twitch_setup(bot)
|
||||
await subathon.twitch_setup(bot)
|
||||
await exec.twitch_setup(bot)
|
||||
await yarn.twitch_setup(bot)
|
||||
|
||||
Submodule src/modules/exec deleted from f0bdbaed3c
+1
-1
Submodule src/modules/profiles updated: c9b6ce8f60...0363dc2bcd
+1
-1
Submodule src/modules/subathon updated: 297eb434d4...11c77bcc89
+1
-1
Submodule src/modules/tracker updated: d7ef852ebb...f853f01bf8
@@ -1,7 +0,0 @@
|
||||
import logging
|
||||
|
||||
logger = logging.getLogger()
|
||||
|
||||
async def twitch_setup(bot):
|
||||
from .component import YarnComponent
|
||||
await bot.add_component(YarnComponent(bot))
|
||||
@@ -1,20 +0,0 @@
|
||||
import asyncio
|
||||
|
||||
import twitchio
|
||||
from twitchio import PartialUser, Scopes, eventsub
|
||||
from twitchio.ext import commands as cmds
|
||||
|
||||
from meta import Bot, Context
|
||||
|
||||
from . import logger
|
||||
|
||||
class YarnComponent(cmds.Component):
|
||||
def __init__(self, bot: Bot):
|
||||
self.bot = bot
|
||||
|
||||
|
||||
@cmds.Component.listener()
|
||||
async def event_custom_redemption_add(self, payload: twitchio.ChannelPointsRedemptionAdd):
|
||||
logger.info(f"Yarn got {payload!r}")
|
||||
if payload.reward.title == 'pet lilac':
|
||||
await payload.broadcaster.send_message("lilac PETPET", sender="1097964183")
|
||||
Reference in New Issue
Block a user