Skip to content

Commit 9b0b682

Browse files
committed
updating with latest code
1 parent b993367 commit 9b0b682

File tree

9 files changed

+66
-34
lines changed

9 files changed

+66
-34
lines changed

setup.cfg

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
[metadata]
2+
name = guildmaster
3+
version = 1.0.0
4+
author = Damien Burks
5+
author_email = [email protected]
6+
description = A collection of scripts for managing Discord channels and other administrative tasks
7+
long_description = file: README.md
8+
long_description_content_type = text/markdown
9+
url = https://github.com/devsecblueprint/guildmaster
10+
classifiers =
11+
Programming Language :: Python :: 3
12+
License :: OSI Approved :: MIT License
13+
Operating System :: OS Independent
14+
15+
[options]
16+
zip_safe = True
17+
include_package_data = True
18+
packages = find:
19+
package_dir =
20+
= src
21+
python_requires = >=3.12
22+
install_requires =
23+
fire
24+
discord.py
25+
26+
[options.entry_points]
27+
console_scripts =
28+
guildmaster = guildmaster.cli:main
29+
30+
[options.package_data]
31+
* = *.md
32+
33+
[options.packages.find]
34+
where = src
35+
exclude =
36+
tests

setup.py

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,3 @@
1-
from setuptools import setup
1+
from setuptools import setup, find_packages
22

3-
setup(
4-
name='dsb-discord-admin-cli',
5-
version='0.1',
6-
py_modules=['src'],
7-
install_requires=[
8-
'discord.py',
9-
'fire'
10-
],
11-
entry_points={
12-
'console_scripts': [
13-
'src = src:main'
14-
]
15-
},
16-
author='Damien Burks',
17-
description='CLI tool for DSB Discord admin tasks',
18-
classifiers=[
19-
'Programming Language :: Python :: 3',
20-
'Operating System :: OS Independent',
21-
]
22-
)
3+
setup()

src/guildmaster/cli.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import sys
2+
import fire
3+
from tasks.role_manager import DiscordRoleManager
4+
5+
class GuildMasterCommands:
6+
"""
7+
A CLI tool for managing Discord server tasks and settings.
8+
"""
9+
def __init__(self):
10+
self.role_manager = DiscordRoleManager()
11+
12+
def main():
13+
try:
14+
fire.Fire(name="guildmaster", component=GuildMasterCommands)
15+
except KeyboardInterrupt:
16+
sys.exit(0)
17+
except Exception as e:
18+
print(f"An error occurred: {e}")
19+
sys.exit(1)
20+
21+
if __name__ == "__main__":
22+
main()

src/guildmaster/tasks/_init_.py

Whitespace-only changes.
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
import asyncio
22
import discord
3-
from client.discord_client import DiscordClient, TOKEN
3+
from client.discord_client import DiscordClient
44

5-
class DiscordRoleAssigner:
5+
class DiscordRoleManager:
66
"""
7-
A class for assigning a role to every member in a Discord server.
7+
A class for managing a role to every member in a Discord server.
88
"""
9+
def __init__(self):
10+
pass
911

10-
def assign(self, guild: int, role: str, delay: float = 3.0):
12+
def assign_to_all(self, guild: int, role: str, delay: float = 3.0):
1113
"""
1214
Assign a role to every member in a Discord server.
1315

src/main.py

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

0 commit comments

Comments
 (0)