浏览代码

moved echo to util

tags/v1.0.0
roxie 6 年前
父节点
当前提交
961a800e64
共有 2 个文件被更改,包括 15 次插入13 次删除
  1. +1
    -13
      cogs/settings.py
  2. +14
    -0
      cogs/util.py

+ 1
- 13
cogs/settings.py 查看文件

@@ -216,19 +216,7 @@ class Settings():
await self.bot.change_presence(status=discordStatus)
await self.bot.say("**:ok:** Status set to {}".format(discordStatus))

@bot.command(pass_context=True, hidden=True)
@checks.is_bot_owner()
async def echo(self, ctx, channel, *, message: str):
if ctx.message.channel_mentions:
for channel in ctx.message.channel_mentions:
await self.bot.send_message(channel, content=message)
return await self.bot.say(":point_left:")
elif channel.isdigit():
channel = ctx.message.server.get_channel(channel)
await self.bot.send_message(channel, content=message)
return await self.bot.say(":point_left:")
else:
return await self.bot.say("You did something wrong smh")


@bot.command(pass_context=True, hidden=True)
@checks.is_bot_owner()

+ 14
- 0
cogs/util.py 查看文件

@@ -1,5 +1,6 @@
import os
import json
import checks
import random
import aiohttp
import discord
@@ -134,6 +135,19 @@ class Util():
else:
return await self.bot.say("Send me shit to upload nig")

@bot.command(pass_context=True, hidden=True)
@checks.is_bot_owner()
async def echo(self, ctx, channel, *, message: str):
if ctx.message.channel_mentions:
for channel in ctx.message.channel_mentions:
await self.bot.send_message(channel, content=message)
return await self.bot.say(":point_left:")
elif channel.isdigit():
channel = ctx.message.server.get_channel(channel)
await self.bot.send_message(channel, content=message)
return await self.bot.say(":point_left:")
else:
return await self.bot.say("You did something wrong smh")

def setup(Bot):
Bot.add_cog(Util(Bot))

正在加载...
取消
保存