commit f18b129907dc2152d52d0da38f0c91d2e6bf34d7
parent 6a4b1f117bae262c8310ca72d80d09bedec5c037
Author: Emily Doherty <git@emily.sh>
Date: Tue, 4 Nov 2025 22:05:53 -0800
Potential fix for "Unknown integration"
Diffstat:
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/token_bot/tracker.py b/token_bot/tracker.py
@@ -17,7 +17,7 @@ from interactions import (
EmbedField,
is_owner,
check,
- StringSelectOption,
+ StringSelectOption, integration_types,
)
from interactions import Task, IntervalTrigger
from interactions import slash_command, listen
@@ -148,6 +148,7 @@ class Tracker(Extension):
name="register",
description="Register with a new GoblinBot Region for alerts on token price changes.",
)
+ @integration_types(guild=True, user=True)
async def register(self, ctx: SlashContext):
text = (
"## Select a region to register with \n\n"
@@ -163,6 +164,7 @@ class Tracker(Extension):
name="remove-registration",
description="Remove all alerts and registration from GoblinBot",
)
+ @integration_types(guild=True, user=True)
async def remove_registration(self, ctx: SlashContext):
if await self._users.exists(ctx.user.id):
user = await self._users.get(ctx.user.id)
@@ -173,16 +175,19 @@ class Tracker(Extension):
await ctx.send("All alert subscriptions and user data deleted", ephemeral=True)
@slash_command(description="The current retail token cost")
+ @integration_types(guild=True, user=True)
async def current(self, ctx: SlashContext):
current_str = await self.get_current_token(ctx, tdb.Flavor.RETAIL)
await ctx.send(current_str, ephemeral=True)
@slash_command(description="The current classic token cost")
+ @integration_types(guild=True, user=True)
async def current_classic(self, ctx: SlashContext):
current_str = await self.get_current_token(ctx, tdb.Flavor.CLASSIC)
await ctx.send(current_str, ephemeral=True)
@slash_command(name="add-alert", description="Add an alert listener")
+ @integration_types(guild=True, user=True)
async def add_alert(self, ctx: SlashContext):
if not await self._users.exists(ctx.user.id):
try:
@@ -223,6 +228,7 @@ class Tracker(Extension):
@slash_command(
name="remove-alert", description="Remove an alert you have signed up for"
)
+ @integration_types(guild=True, user=True)
async def remove_alert(self, ctx: SlashContext):
if not await self._user_is_registered(ctx):
return
@@ -246,6 +252,7 @@ class Tracker(Extension):
@slash_command(
name="list-alerts", description="List all alerts you have signed up for"
)
+ @integration_types(guild=True, user=True)
async def list_alerts(self, ctx: SlashContext):
if not await self._user_is_registered(ctx):
return