|
|
@ -13,7 +13,7 @@ class Messages(commands.Cog): |
|
|
|
self.bot = bot |
|
|
|
|
|
|
|
@discord.message_command() |
|
|
|
async def forward(self, ctx: discord.Interaction, message: discord.Message): |
|
|
|
async def forward(self, ctx, message: discord.Message): |
|
|
|
messages_json = data.load_guild_data(ctx.guild.id, MESSAGES_JSON) |
|
|
|
if "forward_channel" not in messages_json: |
|
|
|
return await ctx.respond(f"Forwarding channel not set.", ephemeral=True) |
|
|
@ -26,7 +26,7 @@ class Messages(commands.Cog): |
|
|
|
@discord.slash_command(description="Sets channel for forwarding.") |
|
|
|
@discord.option("channel", discord.TextChannel, description="Channel for forwarding.") |
|
|
|
@discord.default_permissions(administrator=True) |
|
|
|
async def set_forward_channel(self, ctx: discord.Interaction, channel: discord.TextChannel): |
|
|
|
async def set_forward_channel(self, ctx, channel: discord.TextChannel): |
|
|
|
messages_json = data.load_guild_data(ctx.guild.id, MESSAGES_JSON) |
|
|
|
messages_json["forward_channel"] = channel.id |
|
|
|
data.dump_guild_data(ctx.guild.id, MESSAGES_JSON, messages_json) |
|
|
|