Skip to content
This repository was archived by the owner on May 25, 2021. It is now read-only.

Commit 91c6a8d

Browse files
author
dragdev
committed
0.3
1 parent 2fe25da commit 91c6a8d

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

riftgun/cog.py

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
import discord
55
import sys
6-
import io
76

87
from discord.ext import commands
98
from .converters import GlobalTextChannel
@@ -24,14 +23,15 @@ def print(*values: object, sep: Optional[str]=" ", end: Optional[str] = "\n", fi
2423
file.write("[RiftGun] " + sep.join(str(v) for v in values) + end)
2524
return ''
2625

27-
def rift_admin(ctx: commands.Context):
28-
if not ctx.guild:
29-
raise commands.NoPrivateMessage()
30-
else:
31-
if not ctx.channel.permissions_for(ctx.author).manage_roles:
32-
raise commands.MissingPermissions("manage_roles")
33-
else:
34-
return True
26+
# def rift_admin(ctx: commands.Context):
27+
# if not ctx.guild:
28+
# raise commands.NoPrivateMessage()
29+
# else:
30+
# if not ctx.channel.permissions_for(ctx.author).manage_roles:
31+
# raise commands.MissingPermissions("manage_roles")
32+
# else:
33+
# return True
34+
# May come back into use later?
3535

3636

3737
class RiftGun(commands.Cog):
@@ -46,7 +46,8 @@ def __init__(self, bot: commands.Bot):
4646
print("Loaded data from existing data file.")
4747
self.data = data
4848
except (FileNotFoundError, json.JSONDecodeError):
49-
print("No existing file, or corrupted entries, defaulting to nothing.")
49+
print("No existing file, or corrupted entries, defaulting to nothing. A new file will be created on cog"
50+
" unload or command usage.", file=sys.stderr)
5051
self.data = {}
5152

5253
def cog_unload(self):
@@ -78,7 +79,7 @@ async def open_rifts(self, ctx: commands.Context):
7879
"""Shows all valid, open rifts."""
7980
y, n = "\N{white heavy check mark}", "\N{cross mark}"
8081
pag = commands.Paginator()
81-
for channel_id, webhook_url in self.data.items():
82+
for channel_id, _ in self.data.items():
8283
ic = int(channel_id)
8384
channel = self.bot.get_channel(ic)
8485

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
setup(
44
name='riftgun',
5-
version='0.2',
5+
version='0.3',
66
packages=['riftgun'],
77
long_description=open("README.md").read(),
88
url='https://github.com/dragdev-studios/RiftGun',

0 commit comments

Comments
 (0)