33
44import discord
55import sys
6- import io
76
87from discord .ext import commands
98from .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
3737class 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
0 commit comments