It has random thing, it like a start up for you discord bot
Project description
This is discordRandomStuff it can be a startup for you discord bot or a fun thing for it.
Welcome example
Not in cogs
from discordRandomStuff.welcome import Welcome
from discord.ext import commands
prefix = "t!"
bot = commands.Bot(command_prefix=prefix)
@bot.event
async def on_member_join(self, member):
Welcome(channel=735826080153337898) #Replace those numbers a channel id
Welcome.start() #This will start it
print("DRS welcome module is loaded") #If this shows up in your conosle logs, that means it is loaded
In cogs
from discordRandomStuff.welcome import Welcome
from discord.ext import commands
class Welcome(commands.Cog):
def __init__(self, bot):
self.bot = bot
@commands.Cog.listener() # Event module
async def on_member_join(self, member): # defining it
Welcome(channel=735826080153337898) #Replace those numbers a channel id
Welcome.start() #This will start it
print("DRS welcome module is loaded") #If this shows up in your conosle logs, that means it is loaded
def setup(bot):
bot.add_cog(Welcome(bot))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for DiscordRandomStuff-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2017e7946c31e67d9a1b850785b112b228e10d011d04286c651246aa3d94d26f |
|
MD5 | c1fbe32a428d258e73227026f35d0051 |
|
BLAKE2b-256 | cbbbcc126de0e38931ac3ba970d935bfcfead917cff15e975af302732ea9b646 |