Skip to content
This repository was archived by the owner on Jan 13, 2024. It is now read-only.

Commit a15418e

Browse files
authored
Merge pull request #28 from Athena-Chaos-Driven-Code/refactor
Major Refactor of entire library
2 parents 9c1c825 + e8219cc commit a15418e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+1976
-3001
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.idea/
22
.run/
3+
/.old/
34

45
# Byte-compiled / optimized / DLL files
56
__pycache__/

README.md

Lines changed: 21 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,86 +1,44 @@
1-
# - AthenaTwitchBot -
2-
[![pypi](https://img.shields.io/pypi/v/AthenaTwitchBot)](https://pypi.org/project/AthenaTwitchBot/) [![GitHub license](https://img.shields.io/github/license/DirectiveAthena/AthenaTwitchBot)](https://github.com/DirectiveAthena/VerSC-AthenaColor/blob/master/LICENSE) [![Discord](https://img.shields.io/discord/814599159926620160?color=maroon)](https://discord.gg/6JcDbhXkCH) [![Downloads](https://pepy.tech/badge/athenatwitchbot)](https://pepy.tech/project/athenatwitchbot)
1+
# - AthenaTwitchLib -
2+
[![pypi](https://img.shields.io/pypi/v/AthenaTwitchLib)](https://pypi.org/project/AthenaTwitchLib/) [![GitHub license](https://img.shields.io/github/license/DirectiveAthena/AthenaTwitchLib)](https://github.com/DirectiveAthena/VerSC-AthenaColor/blob/master/LICENSE) [![Discord](https://img.shields.io/discord/814599159926620160?color=maroon)](https://discord.gg/6JcDbhXkCH) [![Downloads](https://pepy.tech/badge/athenatwitchbot)](https://pepy.tech/project/athenatwitchbot)
33

44
---
55
## Package Details
66
#### Details and features
7-
- A library to connect to the Twitch IRC system for a chatbot to utilize
8-
- Isn't dependent on 3rd party packages, except for those that have been created by [@AndreasSas](https://github.com/AndreasSas)
9-
- These can be designated by the leading "*Athena*..."
10-
- These packages aren't seen as a 3rd party dependency as they are all made by the "same party"
7+
- A library to create Twitch Chat Bots
8+
- hard coded commands
9+
- hard coded tasks
10+
- Bots have the ability to pull commands from a database
11+
- Currently supported databases: *Sqlite* (more will come in the future)
12+
- Logging is handled by other Process
13+
- Logs are stored to a Sqlite file
14+
15+
- Features that are planned but still being worked on
16+
- Twitch Helix API connector
17+
- Task pulling from a database
18+
- ...
1119

1220
#### Python Version
13-
- Supported Python versions: **3.10**
14-
- Other older versions of Python are not gonna be supported.
21+
- Supported Python versions: **3.11**
22+
- Other older versions of Python are not going to be supported.
1523

1624
---
17-
## Quick Example
18-
The following example is a working bot, but currently only meant as proof of work as the package is still in its early stages of being developed and needs some heavy tuning.
1925

20-
Stay tuned for updates while we work on this on [stream](https://www.twitch.tv/directiveathena) or come hang out in the [discord](https://discord.com/invite/6JcDbhXkCH).
26+
## Example
27+
**Currently, still in Alpha phase. Will have a good example working once version 1.0.0 is released**
2128

22-
```python
23-
# --- Imports ---
24-
import os
25-
26-
from AthenaTwitchBot.models.twitch_bot.twitch_bot import TwitchBot
27-
from AthenaTwitchBot.models.twitch_bot.bot_methods.bot_command import BotCommand
28-
from AthenaTwitchBot.models.twitch_bot.message_context import MessageContext
29-
from AthenaTwitchBot.models.launcher import Launcher
30-
from AthenaTwitchBot.models.twitch_channel import TwitchChannel
31-
32-
# --- Code ---
33-
class SomeBot(TwitchBot):
34-
def __init__(self):
35-
super(SomeBot, self).__init__(
36-
nickname=..., # <--- your bot name
37-
oauth_token=os.getenv("TWITCH_TOKEN"),
38-
channel=TwitchChannel(...), # <--- your channel name
39-
command_prefix="!",
40-
client_id=os.getenv("TWITCH_CLIENT_ID")
41-
)
42-
43-
@BotCommand.register(name="today")
44-
async def command_today(self, context: MessageContext):
45-
context.reply(f"Today we will be working on: ..." )
46-
47-
# -----------------------------------------------------------------------------
48-
def main():
49-
Launcher.start_Bot(
50-
bot=SomeBot(),
51-
sll=True,
52-
)
53-
54-
if __name__ == '__main__':
55-
main()
56-
57-
```
58-
59-
---
60-
## Documentation
61-
Full documentation can be found at:
62-
**[directiveathena.com/docu](https://publish.obsidian.md/directiveathena/)** (redirect to Obsidian.md publish site)
63-
(Reminder, the documentation is still under heavy development)
64-
65-
---
6629
## Install
6730
To install the package in your Python environment
6831

6932
```
70-
pip install AthenaTwitchBot --upgrade
33+
pip install AthenaTwitchLib --upgrade
7134
```
7235

7336
---
7437

7538
## Links
7639
Project files can be found at:
77-
- [GitHub Repo](https://github.com/DirectiveAthena/AthenaTwitchBot)
78-
- [Pypi link](https://pypi.org/project/AthenaTwitchBot/)
79-
80-
---
81-
82-
## Disclaimer
83-
With *No Dependency*, the standard library is not counted as a dependency
40+
- [GitHub Repo](https://github.com/DirectiveAthena/AthenaTwitchLib)
41+
- [Pypi link](https://pypi.org/project/AthenaTwitchLib/)
8442

8543
---
8644
Made By Andreas Sas,` 2022`

setup.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,28 +18,28 @@ def readme_handler() -> str:
1818

1919
def version_handler() -> str:
2020
# ------------------------------------------------------------------------------------------------------------------
21-
version = 0,8,1 # <-- DEFINE THE VERSION IN A TUPLE FORMAT HERE
21+
version = 0,9,0 # <-- DEFINE THE VERSION IN A TUPLE FORMAT HERE
2222
# ------------------------------------------------------------------------------------------------------------------
2323
return ".".join(str(i) for i in version)
2424

2525
setuptools.setup(
26-
name="AthenaTwitchBot",
26+
name="AthenaTwitchLib",
2727
version=version_handler(),
2828
author="Andreas Sas",
2929
author_email="",
30-
description="A zero 3rd party dependency Twitch bot Connector",
30+
description="A library to create Twitch Chat Bots and connect to the Twitch Helix API.",
3131
long_description=readme_handler(),
3232
long_description_content_type="text/markdown",
33-
url="https://github.com/DirectiveAthena/AthenaTwitchBot",
33+
url="https://github.com/Athena-Chaos-Driven-Code/AthenaTwitchLib",
3434
project_urls={
35-
"Bug Tracker": "https://github.com/DirectiveAthena/AthenaTwitchBot/issues",
35+
"Bug Tracker": "https://github.com/Athena-Chaos-Driven-Code/AthenaTwitchLib/issues",
3636
},
3737
license="GPLv3",
3838
package_dir={"": "src"},
3939
packages=setuptools.find_packages(where="src"),
40-
python_requires=">=3.10",
40+
python_requires=">=3.11",
4141
install_requires=[
42-
"AthenaLib>=1.1.0",
43-
"AthenaColor>=6.0.1"
42+
"AthenaLib>=2.3.0",
43+
"AthenaColor>=7.0.1"
4444
]
4545
)

src/AthenaTwitchBot/data/__init__.py

Lines changed: 0 additions & 13 deletions
This file was deleted.

src/AthenaTwitchBot/data/global_vars.py

Lines changed: 0 additions & 19 deletions
This file was deleted.

src/AthenaTwitchBot/data/irc_twitch.py

Lines changed: 0 additions & 30 deletions
This file was deleted.

src/AthenaTwitchBot/data/message_flags.py

Lines changed: 0 additions & 27 deletions
This file was deleted.

src/AthenaTwitchBot/data/twitch_api_scopes.py

Lines changed: 0 additions & 63 deletions
This file was deleted.

src/AthenaTwitchBot/data/twitch_api_urls.py

Lines changed: 0 additions & 50 deletions
This file was deleted.

src/AthenaTwitchBot/functions/__init__.py

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)