Skip to content

Commit dea7a9b

Browse files
feat: added /t commands that redirects to /tag get
added Development and Production variables chore: changed LICENSE to us Acked-by: FreebieII <[email protected]>
1 parent 78bba0a commit dea7a9b

File tree

5 files changed

+48
-18
lines changed

5 files changed

+48
-18
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2015-present Rapptz
3+
Copyright (c) 2022 Ogiroid Development Team
44

55
Permission is hereby granted, free of charge, to any person obtaining a
66
copy of this software and associated documentation files (the "Software"),

cogs/tags.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import re
44

55
import disnake
6-
from disnake import Embed
6+
from disnake import Embed, ApplicationCommandInteraction
77
from disnake.ext import commands
88

99
from utils.CONSTANTS import tag_help
@@ -44,6 +44,10 @@ def db(self):
4444
async def tag(self, inter):
4545
pass
4646

47+
@commands.slash_command(name="t", aliases=["tg"], description="Get a tag", hidden=True)
48+
async def get_tag(self, inter: ApplicationCommandInteraction, *, name: str):
49+
return await self.get(inter, name)
50+
4751
@tag.sub_command(name="get", description="Gets you the tags value")
4852
@commands.guild_only()
4953
async def get(self, inter, name: str):

cogs/tickets.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import disnake
44
from disnake.ext import commands
55

6-
from utils.CONSTANTS import STAFF_ROLE, TICKET_PERMS
6+
from utils.CONSTANTS import TICKET_PERMS
77
from utils.bot import OGIROID
88
from utils.shortcuts import errorEmb
99

@@ -47,7 +47,7 @@ async def on_button_click(self, inter):
4747
if not inter.component.custom_id == "ticket_button":
4848
return
4949

50-
staff = guild.get_role(STAFF_ROLE)
50+
staff = guild.get_role(self.bot.config.roles.staff)
5151

5252
# checks if user has a ticket already open
5353
for channel in guild.channels:

utils/CONSTANTS.py

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,37 @@
11
from __future__ import annotations
2-
32
from dataclasses import dataclass
43

54
__VERSION__ = "1.6.0"
65

7-
86
@dataclass
97
class Channels:
10-
suggestion: int = 985554479405490216
11-
bug_report: int = 985554459948122142
8+
suggestion: int = 982353129913851924
9+
bug_report: int = 982669110926250004
1210
errors: int = 986531210283069450
1311
reddit_faq: int = 985908874362093620
14-
tickets: int = 1003006753564262452
15-
logs: int = 988162723890217040
16-
staff_vote: int = 1002132747441152071 # We will change the channel ID later to "1005741491861344286".
12+
tickets: int = 1005904969737711760
13+
logs: int = 977581277010100315
14+
staff_vote: int = 1005741491861344286
15+
16+
@classmethod
17+
def dev(cls):
18+
cls.suggestion: int = 985554479405490216
19+
cls.bug_report: int = 985554459948122142
20+
cls.reddit_faq: int = 985908874362093620
21+
cls.tickets: int = 1003006753564262452
22+
cls.logs: int = 988162723890217040
23+
cls.staff_vote: int = 1002132747441152071
24+
return cls
25+
1726

27+
@dataclass
28+
class Roles:
29+
staff: int = 985943266115584010
30+
31+
@classmethod
32+
def dev(cls):
33+
cls.staff: int = 1005904440039047208
34+
return cls
1835

1936
@dataclass
2037
class Colors:
@@ -33,7 +50,7 @@ def status(stat):
3350
return statuses[stat]
3451

3552

36-
STAFF_ROLE = 985943266115584010
53+
IGNORE_EXCEPTIONS = ["UserBlacklisted"]
3754
morse = {
3855
"0": "-----",
3956
"1": ".----",
@@ -92,7 +109,7 @@ def status(stat):
92109
}
93110
tag_help = {
94111
"public": {
95-
"tag get": "Gives you the tags value",
112+
"tag get (or /t)": "Gives you the tags value",
96113
"tag create": "Creates a tag",
97114
"tag help": "Gives you this help",
98115
"tag info": "Gives you the tags info (views, owner, etc)",
@@ -426,4 +443,3 @@ def status(stat):
426443
"yeethon",
427444
"zig",
428445
]
429-
IGNORE_EXCEPTIONS = ["UserBlacklisted"]

utils/config.py

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,17 @@
33

44
@dataclass
55
class Config:
6-
channels = Channels
7-
colors = Colors
8-
colours = colors
9-
debug = False
6+
Development = True # if true will use base server ID's else will use development server ID's
7+
if Development:
8+
print("Using Development Config variable")
9+
channels = Channels.dev()
10+
roles = Roles
11+
colors = Colors
12+
colours = colors
13+
debug = True
14+
else:
15+
channels = Channels
16+
roles = Roles
17+
colors = Colors
18+
colours = colors
19+
debug = False

0 commit comments

Comments
 (0)