Skip to content

Commit

Permalink
bot.py を更新
Browse files Browse the repository at this point in the history
  • Loading branch information
ysmreg authored Jan 30, 2024
1 parent e39122b commit a5f97f7
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions util/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@ def __init__(self, *args, **kwargs):
kwargs["command_prefix"] = self.get_prefix
return super().__init__(*args, **kwargs)

async def get_prefix(self, m):
pr = data["prefixes"][argv[-1]]
if m.author.id in self.user_prefixes and self.user_prefixes[m.author.id]:
pr.append(self.user_prefixes[m.author.id])
if m.guild.id in self.guild_prefixes and self.guild_prefixes[m.guild.id]:
pr.append(self.guild_prefixes[m.guild.id])
async def get_prefix(self, m = None):
pr = data["prefixes"][argv[-1]]
if not m == None:
if m.author.id in self.user_prefixes and self.user_prefixes[m.author.id]:
pr.append(self.user_prefixes[m.author.id])
if m.guild.id in self.guild_prefixes and self.guild_prefixes[m.guild.id]:
pr.append(self.guild_prefixes[m.guild.id])
return pr

@property
Expand Down

0 comments on commit a5f97f7

Please sign in to comment.