Browse Source

moved echo to util

tags/v1.0.0
roxie 6 years ago
parent
commit
961a800e64
2 changed files with 15 additions and 13 deletions
  1. +1
    -13
      cogs/settings.py
  2. +14
    -0
      cogs/util.py

+ 1
- 13
cogs/settings.py View File

await self.bot.change_presence(status=discordStatus) await self.bot.change_presence(status=discordStatus)
await self.bot.say("**:ok:** Status set to {}".format(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) @bot.command(pass_context=True, hidden=True)
@checks.is_bot_owner() @checks.is_bot_owner()

+ 14
- 0
cogs/util.py View File

import os import os
import json import json
import checks
import random import random
import aiohttp import aiohttp
import discord import discord
else: else:
return await self.bot.say("Send me shit to upload nig") 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): def setup(Bot):
Bot.add_cog(Util(Bot)) Bot.add_cog(Util(Bot))

Loading…
Cancel
Save