-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/Mantou-9487/KeyWord
- Loading branch information
Showing
7 changed files
with
361 additions
and
335 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
TOKEN="" |
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 @@ | ||
name: Docker Image CI | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
tags: | ||
- 'v*' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Build the Docker image | ||
run: docker build . --file Dockerfile -t ghcr.io/mantou-9487/keyword:latest | ||
|
||
- name: Login to GitHub Registry | ||
run: echo "${{ secrets.DOCKER_GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin | ||
|
||
- name: Push to GitHub Registry | ||
run: docker push ghcr.io/mantou-9487/keyword:latest |
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,2 @@ | ||
# KeyWord | ||
A Discord Keyword Notification Bot. |
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 |
---|---|---|
@@ -1,15 +1,15 @@ | ||
from logging import Logger | ||
|
||
from disnake.ext.commands import Bot as OriginalBot | ||
|
||
|
||
|
||
class Bot(OriginalBot): | ||
def __init__(self, logger: Logger, **kwargs): | ||
super().__init__(**kwargs) | ||
|
||
self.logger = logger | ||
|
||
async def on_ready(self): | ||
self.logger.info("The bot is ready! Logged in as %s" % self.user) | ||
|
||
from logging import Logger | ||
|
||
from disnake.ext.commands import Bot as OriginalBot | ||
|
||
|
||
|
||
class Bot(OriginalBot): | ||
def __init__(self, logger: Logger, **kwargs): | ||
super().__init__(**kwargs) | ||
|
||
self.logger = logger | ||
|
||
async def on_ready(self): | ||
self.logger.info("The bot is ready! Logged in as %s" % self.user) | ||
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 |
---|---|---|
@@ -1,33 +1,33 @@ | ||
from disnake import Embed | ||
|
||
# pylint: disable=C0116 | ||
# pylint: disable=C0115 | ||
|
||
class SuccessEmbed(Embed): | ||
def __init__(self, title: str, description: str = None, **kwargs): | ||
super().__init__(title="✅ | " + title, description=description, color=0x0f9d58, **kwargs) | ||
self._files = {} | ||
|
||
|
||
class InfoEmbed(Embed): | ||
def __init__(self, title: str, description: str = None, **kwargs): | ||
super().__init__(title="ℹ️ | " + title, description=description, color=0x4285f4, **kwargs) | ||
|
||
|
||
class LoadingEmbed(Embed): | ||
def __init__(self, title: str, description: str = None, **kwargs): | ||
super().__init__(title="⌛ | " + title, description=description, color=0x4285F4, **kwargs) | ||
|
||
|
||
class WarningEmbed(Embed): | ||
def __init__(self, title: str, description: str = None, **kwargs): | ||
super().__init__(title="⚠ | " + title, description=description, color=0xf4b400, **kwargs) | ||
|
||
|
||
class ErrorEmbed(Embed): | ||
def __init__(self, title: str, description: str = None, **kwargs): | ||
super().__init__(title="❌ | " + title, description=description, color=0xdb4437, **kwargs) | ||
|
||
class HelpEmbed(Embed): | ||
def __init__(self, title: str, description: str = None, **kwargs): | ||
super().__init__(title=title, description=description, color=0xdb4437, **kwargs) | ||
from disnake import Embed | ||
|
||
# pylint: disable=C0116 | ||
# pylint: disable=C0115 | ||
|
||
class SuccessEmbed(Embed): | ||
def __init__(self, title: str, description: str = None, **kwargs): | ||
super().__init__(title="✅ | " + title, description=description, color=0x0f9d58, **kwargs) | ||
self._files = {} | ||
|
||
|
||
class InfoEmbed(Embed): | ||
def __init__(self, title: str, description: str = None, **kwargs): | ||
super().__init__(title="ℹ️ | " + title, description=description, color=0x4285f4, **kwargs) | ||
|
||
|
||
class LoadingEmbed(Embed): | ||
def __init__(self, title: str, description: str = None, **kwargs): | ||
super().__init__(title="⌛ | " + title, description=description, color=0x4285F4, **kwargs) | ||
|
||
|
||
class WarningEmbed(Embed): | ||
def __init__(self, title: str, description: str = None, **kwargs): | ||
super().__init__(title="⚠ | " + title, description=description, color=0xf4b400, **kwargs) | ||
|
||
|
||
class ErrorEmbed(Embed): | ||
def __init__(self, title: str, description: str = None, **kwargs): | ||
super().__init__(title="❌ | " + title, description=description, color=0xdb4437, **kwargs) | ||
|
||
class HelpEmbed(Embed): | ||
def __init__(self, title: str, description: str = None, **kwargs): | ||
super().__init__(title=title, description=description, color=0xdb4437, **kwargs) |
Oops, something went wrong.