Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
import discord
from discord.ext import commands
class Fun:
def __init__(self, client):
self.client = client
@commands.command(description="Concatenates the string after called with a gnome",
brief="Gnome's ya boi",
pass_context=True)
async def gnome(self,ctx, receiver):
"""Uses the receiver argument to concatinate a string to gnome anothuer user also mentions the author"""
message = "{0} you've just been gnomed by {1} https://gyazo.com/6f0fe2316d674b1ff9b0a9b8d471b71d.png".format(receiver,
ctx.message.author.mention)
await self.client.say(message)
async def on_message(self,message):
if message.author == self.client.user:
return
# if the user id posts a message in chat then it executes code
if message.author.id == "146032122774159360" and message.server.id == "505113732456775690":
await self.client.add_reaction(message, "👺")
# if a message contains "boost" in any place and the server id is the one specified it will send a message
if "boost" in message.content and message.server.id == "497091157591982081":
await self.client.send_message(message.channel, "https://gyazo.com/2a785b68d62386ad3566f671c81e532c.png")
def setup(client):
client.add_cog(Fun(client))