def __init__(self, *args, **kwargs): self.token = "MzU4MzU0NTYwMDY4MDkxOTA0.DMzrUQ.p6D3fnE8nhkpJx9D8ZfZjFqrpYk" super().__init__(command_prefix=self.get_pre, owner_id=356268554494148608) self.db = sql.MySQL() self.run()
def __init__(self): self.token = open("token.txt").read() super().__init__(command_prefix="!", owner_id=356268554494148608) self.db = sql.MySQL() self.run()
def __init__(self, bot): super().__init__() self.bot = bot self.db = sql.MySQL() try: self.imgur = ImgurClient( 'a7a517a27f5cb30', '8587bb31ad9b16494ac4f1b5318bf224f65fd043') except: print("Imgur Error!") self.bot.remove_command("hug")
def __init__(self, bot): super().__init__() self.bot = bot self.db = sql.MySQL() self._mentions_transforms = { '@everyone': '@\u200beveryone', '@here': '@\u200bhere' } self._mention_pattern = re.compile('|'.join( self._mentions_transforms.keys()))
import tkinter as tk from PIL import Image, ImageTk import sql from functools import partial link = sql.MySQL() class Ikeo(tk.Tk): def __init__(self, *args, **kwargs): tk.Tk.__init__(self, *args, **kwargs) self.title('IKEO') self.geometry('900x720') self.config(bg="#CE0036") # logo = Image.open('ikeo_titre.png') # logo = ImageTk.PhotoImage(logo) # logo_label = tk.Label(bd = 0, image=logo) # logo_label.image= logo # logo_label.pack(side="top") container = tk.Frame(self) container.pack(side="top", fill="both", expand=True) container.grid_rowconfigure(0, weight=1) container.grid_columnconfigure(0, weight=1) self.frames = {} for F in (StartPage, PageOne, PageTwo): frame = F(container, self) self.frames[F] = frame frame.grid(row=0, column=0, sticky="nsew")
def __init__(self, bot): super().__init__() self.bot = bot self.db = sql.MySQL()