-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
81 changed files
with
1,216 additions
and
1,262 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export const authorize = (env: Env) => (request: Request) => { | ||
if (request.headers.get('Authorization') !== env.APP_KEY) { | ||
return new Response('Unauthorized', { status: 401 }) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import settings_command from '../modules/admin/views/commands/settings' | ||
import test_module from '../modules/experimental/views/commands/test_command' | ||
import help_command from '../modules/help_command' | ||
import leaderboard_command from '../modules/leaderboard/commands/leaderboard' | ||
import match_history_module from '../modules/matches/logging/views' | ||
import matchmaking_module from '../modules/matches/matchmaking/views' | ||
import record_match_command from '../modules/matches/recording/views/commands/record_match_command' | ||
import stats_command from '../modules/players/views/commands/stats' | ||
import rankings_module from '../modules/rankings/views' | ||
import util_views from '../modules/utils/views' | ||
import { ViewModule } from '../utils/view_module' | ||
|
||
export default new ViewModule([ | ||
rankings_module, | ||
match_history_module, | ||
matchmaking_module, | ||
util_views, | ||
help_command, | ||
stats_command, | ||
leaderboard_command, | ||
settings_command, | ||
test_module, | ||
record_match_command, | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { overwriteDiscordCommandsWithViews, respondToInteraction } from '../../../discord-framework' | ||
import type { App } from '../../context/app_context' | ||
import views from './all_views' | ||
import { onViewError } from './on_view_error' | ||
|
||
export async function handleInteractionRequest(app: App, request: Request) { | ||
return respondToInteraction(app.bot, request, views.getFindViewCallback(app), onViewError(app)) | ||
} | ||
|
||
export async function syncDiscordCommands(app: App, guild_id?: string) { | ||
await overwriteDiscordCommandsWithViews( | ||
app.bot, | ||
await views.getAllCommandSignatures(app, guild_id), | ||
guild_id, | ||
) | ||
} |
Oops, something went wrong.