Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Creating apis

NightZan NightZan999

🎯
Creating apis
View GitHub Profile
@NightZan999
NightZan999 / bot.py
Created Dec 23, 2020
A perfect giveaway bot code example with discord.py, :fail: is a custom emoji. So use instead or something else
View bot.py
from discord.ext import commands
from os import listdir
client = commands.Bot(command_prefix = "g!")
@client.event
async def on_ready():
print("Bot is ready!")
def load_cogs(client):
@NightZan999
NightZan999 / admin.py
Created Dec 23, 2020
Cogs example with bot, discord.py. Made from https://github.com/NightZan999/TheImperialGod. :success: is a custom emoji from my server, so use your own instead of that!
View admin.py
import discord
from discord.ext import commands
import json
from discord.ext.commands import has_permissions
import asyncio
class Admin(commands.Cog):
def __init__(self, client):
self.client = client