mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-07 11:48:55 -05:00
[V3] guild->server (#1529)
Mostly string renames
customcom now recognized {guild} and {server}
This commit is contained in:
parent
1bc650b0f9
commit
705d9b8238
@ -65,7 +65,7 @@ class Announcer:
|
|||||||
try:
|
try:
|
||||||
await channel.send(self.message)
|
await channel.send(self.message)
|
||||||
except discord.Forbidden:
|
except discord.Forbidden:
|
||||||
await bot_owner.send("I could not announce to guild: {}".format(
|
await bot_owner.send("I could not announce to server: {}".format(
|
||||||
g.id
|
g.id
|
||||||
))
|
))
|
||||||
await asyncio.sleep(0.5)
|
await asyncio.sleep(0.5)
|
||||||
|
|||||||
@ -193,7 +193,7 @@ class Audio:
|
|||||||
status = await self.config.status()
|
status = await self.config.status()
|
||||||
vote_percent = data['vote_percent']
|
vote_percent = data['vote_percent']
|
||||||
msg = ('```ini\n'
|
msg = ('```ini\n'
|
||||||
'----Guild Settings----\n')
|
'----Server Settings----\n')
|
||||||
if dj_enabled:
|
if dj_enabled:
|
||||||
msg += 'DJ Role: [{}]\n'.format(dj_role_obj.name)
|
msg += 'DJ Role: [{}]\n'.format(dj_role_obj.name)
|
||||||
if jukebox:
|
if jukebox:
|
||||||
|
|||||||
@ -87,11 +87,11 @@ class Bank:
|
|||||||
@checks.is_owner()
|
@checks.is_owner()
|
||||||
async def bankset_toggleglobal(self, ctx: commands.Context, confirm: bool=False):
|
async def bankset_toggleglobal(self, ctx: commands.Context, confirm: bool=False):
|
||||||
"""Toggles whether the bank is global or not
|
"""Toggles whether the bank is global or not
|
||||||
If the bank is global, it will become per-guild
|
If the bank is global, it will become per-server
|
||||||
If the bank is per-guild, it will become global"""
|
If the bank is per-server, it will become global"""
|
||||||
cur_setting = await bank.is_global()
|
cur_setting = await bank.is_global()
|
||||||
|
|
||||||
word = _("per-guild") if cur_setting else _("global")
|
word = _("per-server") if cur_setting else _("global")
|
||||||
if confirm is False:
|
if confirm is False:
|
||||||
await ctx.send(
|
await ctx.send(
|
||||||
_("This will toggle the bank to be {}, deleting all accounts "
|
_("This will toggle the bank to be {}, deleting all accounts "
|
||||||
|
|||||||
@ -292,7 +292,7 @@ class CustomCommands:
|
|||||||
|
|
||||||
if not response:
|
if not response:
|
||||||
await ctx.send(_(
|
await ctx.send(_(
|
||||||
"There are no custom commands in this guild."
|
"There are no custom commands in this server."
|
||||||
" Use `{}` to start adding some.").format(
|
" Use `{}` to start adding some.").format(
|
||||||
"{}customcom add".format(ctx.prefix)
|
"{}customcom add".format(ctx.prefix)
|
||||||
))
|
))
|
||||||
@ -381,7 +381,8 @@ class CustomCommands:
|
|||||||
"message": message,
|
"message": message,
|
||||||
"author": message.author,
|
"author": message.author,
|
||||||
"channel": message.channel,
|
"channel": message.channel,
|
||||||
"guild": message.guild
|
"guild": message.guild,
|
||||||
|
"server": message.guild
|
||||||
}
|
}
|
||||||
if result in objects:
|
if result in objects:
|
||||||
return str(objects[result])
|
return str(objects[result])
|
||||||
|
|||||||
@ -510,7 +510,7 @@ class Economy:
|
|||||||
guild = ctx.guild
|
guild = ctx.guild
|
||||||
credits_name = await bank.get_currency_name(guild)
|
credits_name = await bank.get_currency_name(guild)
|
||||||
if await bank.is_global():
|
if await bank.is_global():
|
||||||
await ctx.send("The bank must be per-guild for per-role paydays to work.")
|
await ctx.send("The bank must be per-server for per-role paydays to work.")
|
||||||
else:
|
else:
|
||||||
await self.config.role(role).PAYDAY_CREDITS.set(creds)
|
await self.config.role(role).PAYDAY_CREDITS.set(creds)
|
||||||
await ctx.send(_("Every payday will now give {} {} to people with the role {}."
|
await ctx.send(_("Every payday will now give {} {} to people with the role {}."
|
||||||
|
|||||||
@ -235,7 +235,7 @@ class General:
|
|||||||
|
|
||||||
data = discord.Embed(description=activity, colour=user.colour)
|
data = discord.Embed(description=activity, colour=user.colour)
|
||||||
data.add_field(name=_("Joined Discord on"), value=created_on)
|
data.add_field(name=_("Joined Discord on"), value=created_on)
|
||||||
data.add_field(name=_("Joined this guild on"), value=joined_on)
|
data.add_field(name=_("Joined this server on"), value=joined_on)
|
||||||
data.add_field(name=_("Roles"), value=roles, inline=False)
|
data.add_field(name=_("Roles"), value=roles, inline=False)
|
||||||
data.set_footer(text=_("Member #{} | User ID: {}"
|
data.set_footer(text=_("Member #{} | User ID: {}"
|
||||||
"").format(member_number, user.id))
|
"").format(member_number, user.id))
|
||||||
@ -260,7 +260,7 @@ class General:
|
|||||||
@commands.command()
|
@commands.command()
|
||||||
@commands.guild_only()
|
@commands.guild_only()
|
||||||
async def serverinfo(self, ctx):
|
async def serverinfo(self, ctx):
|
||||||
"""Shows guild's informations"""
|
"""Shows server's informations"""
|
||||||
guild = ctx.guild
|
guild = ctx.guild
|
||||||
online = len([m.status for m in guild.members
|
online = len([m.status for m in guild.members
|
||||||
if m.status == discord.Status.online or
|
if m.status == discord.Status.online or
|
||||||
@ -285,7 +285,7 @@ class General:
|
|||||||
data.add_field(name=_("Voice Channels"), value=voice_channels)
|
data.add_field(name=_("Voice Channels"), value=voice_channels)
|
||||||
data.add_field(name=_("Roles"), value=len(guild.roles))
|
data.add_field(name=_("Roles"), value=len(guild.roles))
|
||||||
data.add_field(name=_("Owner"), value=str(guild.owner))
|
data.add_field(name=_("Owner"), value=str(guild.owner))
|
||||||
data.set_footer(text=_("Guild ID: ") + str(guild.id))
|
data.set_footer(text=_("Server ID: ") + str(guild.id))
|
||||||
|
|
||||||
if guild.icon_url:
|
if guild.icon_url:
|
||||||
data.set_author(name=guild.name, url=guild.icon_url)
|
data.set_author(name=guild.name, url=guild.icon_url)
|
||||||
|
|||||||
@ -100,7 +100,7 @@ class ModLog:
|
|||||||
try:
|
try:
|
||||||
case = await modlog.get_case(number, ctx.guild, self.bot)
|
case = await modlog.get_case(number, ctx.guild, self.bot)
|
||||||
except RuntimeError:
|
except RuntimeError:
|
||||||
await ctx.send(_("That case does not exist for that guild"))
|
await ctx.send(_("That case does not exist for that server"))
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
await ctx.send(embed=await case.get_case_msg_content())
|
await ctx.send(embed=await case.get_case_msg_content())
|
||||||
@ -110,7 +110,7 @@ class ModLog:
|
|||||||
async def reason(self, ctx: RedContext, case: int, *, reason: str = ""):
|
async def reason(self, ctx: RedContext, case: int, *, reason: str = ""):
|
||||||
"""Lets you specify a reason for mod-log's cases
|
"""Lets you specify a reason for mod-log's cases
|
||||||
Please note that you can only edit cases you are
|
Please note that you can only edit cases you are
|
||||||
the owner of unless you are a mod/admin or the guild owner"""
|
the owner of unless you are a mod/admin or the server owner"""
|
||||||
author = ctx.author
|
author = ctx.author
|
||||||
guild = ctx.guild
|
guild = ctx.guild
|
||||||
if not reason:
|
if not reason:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user