-
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.
Update version New architecture Shorten for long bot phrases (width=2000) Update message respond: Reply tactic disable `role`, `user`, `@everyone`, `@here` mentions Add mentions on reply for better visibility
- Loading branch information
Showing
12 changed files
with
67 additions
and
42 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from .used_objects import ErrorEmbed | ||
from .boltalka_api import BoltalkaAPI | ||
from .boltalka_gateway_bot import BoltalkaGatewayBot | ||
|
||
|
||
__all__ = ( | ||
"BoltalkaAPI", | ||
"BoltalkaGatewayBot", | ||
"ErrorEmbed", | ||
) |
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,38 @@ | ||
import asyncio | ||
from pathlib import Path | ||
|
||
import aiohttp | ||
import hikari | ||
|
||
from .config import TomlConfigLoader | ||
from discoboltalka.api.boltalka_api import BoltalkaAPI | ||
from discoboltalka.api.boltalka_gateway_bot import BoltalkaGatewayBot | ||
|
||
|
||
async def async_main() -> None: | ||
config_loader = TomlConfigLoader(Path("config.toml")) | ||
config = config_loader.load() | ||
|
||
client_session = aiohttp.ClientSession() | ||
boltalka_api = BoltalkaAPI( | ||
client_session=client_session, | ||
client_name=config.boltalka_config.client_name, | ||
) | ||
|
||
bot = BoltalkaGatewayBot( | ||
token=config.bot_config.token, | ||
boltalka_api=boltalka_api, | ||
intents=hikari.Intents.GUILD_MESSAGES, | ||
) | ||
|
||
try: | ||
await bot.start() | ||
await bot.join() | ||
finally: | ||
await bot.close() | ||
await client_session.close() | ||
|
||
|
||
def main() -> None: | ||
asyncio.run(async_main()) | ||
|