Skip to content

Commit e04524b

Browse files
committed
V2
1 parent 30a5ad4 commit e04524b

20 files changed

+375
-150
lines changed
800 Bytes
Binary file not shown.
1.41 KB
Binary file not shown.
3.14 KB
Binary file not shown.
1.26 KB
Binary file not shown.
653 Bytes
Binary file not shown.
2.37 KB
Binary file not shown.
1.39 KB
Binary file not shown.

commandes/autres.py

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import time
2+
import discord
3+
from discord.ext import commands
4+
import random
5+
6+
class Autres(commands.Cog):
7+
def __init__(self, bot):
8+
self.bot = bot
9+
10+
@commands.command()
11+
async def gr(self,ctx,arg):
12+
print(arg)
13+
14+
15+
16+
17+
18+
19+
def setup(client):
20+
client.add_cog(Autres(client))

commandes/events.py

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import time
2+
import discord
3+
from discord.ext import commands
4+
import random
5+
6+
class Events(commands.Cog):
7+
def __init__(self, bot):
8+
self.bot = bot
9+
10+
11+
#event : quand un membre rejoins
12+
@commands.Cog.listener()
13+
async def on_member_join(member):
14+
#creation d'un salon mp , et envoi d'un message dessus
15+
dm = await member.create_dm()
16+
await dm.send(f"__**Bienvenue a toi @{member} sur GoDev.**__ \n \n Nous sommes un serveur regroupant une communauté grandissante de développeurs et passionnés d'informatique et technologie ! , un serveur tres amusant ou tu ne t'enuiras jamais , et où tu trouveras la reponse a tes questions ;). \n \n avant tout , tu dois lire le règlement du serveur dans <#712590475906777089> et de choisir tes roles dans <#712628072620228658>. \n \n `-et toi tki ? tkoi ?`\n Je suis le Bot de GoDev serveur codé par Kross et Netark. Il suffit de faire `<aide` pour en savoir plus sur comment m'utiliser ! ")
17+
18+
19+
20+
21+
22+
23+
24+
25+
def setup(client):
26+
client.add_cog(Events(client))

commandes/fun.py

+90
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
import time
2+
import discord
3+
from discord.ext import commands
4+
import random
5+
6+
class Fun(commands.Cog):
7+
8+
9+
def __init__(self, bot):
10+
self.bot = bot
11+
12+
13+
poulets=["https://cdn.discordapp.com/attachments/609504927907315743/701089648851550299/575252fbea6f2580d4f10a0644627df5.jpg","https://cdn.discordapp.com/attachments/609504927907315743/701089649841668146/EVY5YWPXkAE3VzH.jpg","https://cdn.discordapp.com/attachments/609504927907315743/701089650630066307/image003_1.jpg","https://cdn.discordapp.com/attachments/609504927907315743/701089698998911026/booted-bantam-14b1c8ca-4925-4acf-a167-769805efd71-resize-750.jpeg",
14+
"https://cdn.discordapp.com/attachments/609504927907315743/701089698998911026/booted-bantam-14b1c8ca-4925-4acf-a167-769805efd71-resize-750.jpeg","https://cdn.discordapp.com/attachments/609504927907315743/701090151387889699/bd83755717bbb245026edd9bc0fb4a3c.jpg","https://cdn.discordapp.com/attachments/609504927907315743/701090151639548054/2dfaa9ecb248337c2c6dc4d8675d512f.jpg","https://cdn.discordapp.com/attachments/609504927907315743/701090151857913866/chicken-1.png"]
15+
16+
17+
18+
@commands.command()
19+
async def say(self,ctx,*args):
20+
#creation d'un variable output qui contient ce que le bot doit renvoyer
21+
output = ''
22+
23+
#pour chaque mot dans les arguments de la commande , on ajoute ce mot+ un espace a la var output
24+
for word in args:
25+
output += word
26+
output += ' '
27+
28+
#si : dans la var output il y a @here , le bot envoie un message au lieu de renvoyer @here
29+
if "@here " in output:
30+
await ctx.send("non petit malin :^)")
31+
32+
#et si : @everyone est dans la var output , le bot envoie un message au lieu de renvoyer @everyone
33+
elif "@everyone" in output:
34+
await ctx.send("non petit malin :^)")
35+
#sinon : execution normale du reste de la commande
36+
else:
37+
await ctx.send(output)
38+
messa = ctx.message
39+
await messa.delete()
40+
41+
@commands.command()
42+
async def jaja(self,ctx,target):
43+
#Y A PAS MOYEN JAJA
44+
await ctx.send("t'as pas ded ça !")
45+
await ctx.send(f"c'est pas comme ça qu'on fait le choses , {target} !")
46+
47+
@commands.command()
48+
async def figth(self,ctx,combatan):
49+
chalenjer = ctx.message.author.id
50+
await ctx.send(f"un combat sans mercie s'enclenche entre <@!{chalenjer}> et {combatan}")
51+
await ctx.send("qui va gagner......")
52+
gagnant = [combatan,chalenjer,"personne , vous etes tous nuls"]
53+
random.shuffle(gagnant)
54+
random.shuffle(gagnant)
55+
await ctx.send(f"le gagnant du combat est :")
56+
if gagnant[0] == chalenjer:
57+
await ctx.send("<@!{chalenjer}>")
58+
elif gagnant[0] == combatan:
59+
await ctx.send(combatan)
60+
else:
61+
gagnant[0]
62+
63+
64+
@commands.command()
65+
async def poulet(self,ctx):
66+
poulets=["https://cdn.discordapp.com/attachments/609504927907315743/701089648851550299/575252fbea6f2580d4f10a0644627df5.jpg","https://cdn.discordapp.com/attachments/609504927907315743/701089649841668146/EVY5YWPXkAE3VzH.jpg","https://cdn.discordapp.com/attachments/609504927907315743/701089650630066307/image003_1.jpg","https://cdn.discordapp.com/attachments/609504927907315743/701089698998911026/booted-bantam-14b1c8ca-4925-4acf-a167-769805efd71-resize-750.jpeg",
67+
"https://cdn.discordapp.com/attachments/609504927907315743/701089698998911026/booted-bantam-14b1c8ca-4925-4acf-a167-769805efd71-resize-750.jpeg","https://cdn.discordapp.com/attachments/609504927907315743/701090151387889699/bd83755717bbb245026edd9bc0fb4a3c.jpg","https://cdn.discordapp.com/attachments/609504927907315743/701090151639548054/2dfaa9ecb248337c2c6dc4d8675d512f.jpg","https://cdn.discordapp.com/attachments/609504927907315743/701090151857913866/chicken-1.png"]
68+
random.shuffle(poulets)
69+
poulembed=discord.Embed(title="Un poulet",description="Un magnifique poulet :",color=0x00ffae)
70+
poulembed.set_image(url=poulets[1])
71+
await ctx.send(embed=poulembed)
72+
73+
@commands.command()
74+
async def homicide(self,ctx,per):
75+
hh = ctx.message.author.id
76+
await ctx.send(f"<@!{hh}> a mis fin aux jours de {per}")
77+
78+
79+
80+
81+
82+
83+
84+
85+
86+
87+
88+
89+
def setup(client):
90+
client.add_cog(Fun(client))

commandes/infos.py

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import time
2+
import discord
3+
from discord.ext import commands
4+
import random
5+
6+
class Infos(commands.Cog):
7+
def __init__(self, bot):
8+
self.bot = bot
9+
10+
@commands.command()
11+
async def code(self,ctx):
12+
#envoi de messages pour expliquer comment envoyer un code sur discord
13+
await ctx.send("pour envoyer ton code , fait ceci")
14+
await ctx.send("```ton_langage")
15+
await ctx.send("ton code")
16+
await ctx.send("```")
17+
await ctx.send("exemple :\n ```python\nprint('exemple') \n```")
18+
19+
20+
@commands.command()
21+
async def aidemp(self,ctx):
22+
#envoie un message expliquant pourquoi l'aide en mp est deconseillée
23+
await ctx.send("l'aide en mp est fortement déconseillée !\ncar elle nuit a l'aprentissage collectif , si vous aidez une personne ne mp les autres ne pourront pas profiter de cette aide.")
24+
25+
26+
27+
28+
29+
30+
31+
def setup(client):
32+
client.add_cog(Infos(client))

commandes/messages.py

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
2+
import discord
3+
from discord.ext import commands
4+
import random
5+
import time
6+
class Messages(commands.Cog):
7+
def __init__(self, bot):
8+
self.bot = bot
9+
10+
11+
12+
13+
14+
15+
def setup(client):
16+
client.add_cog(Messages(client))

commandes/staff.py

+81
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
import time
2+
import discord
3+
from discord.ext import commands
4+
import random
5+
6+
class Staff(commands.Cog):
7+
def __init__(self, bot):
8+
self.bot = bot
9+
10+
11+
#commande d'expulsion
12+
@commands.command()
13+
@commands.has_permissions(kick_members=True, ban_members=True)
14+
async def kick(self,ctx, member : discord.Member, *, reason="pas de raison"):
15+
#recup. de l'id de l'executeur de la commande
16+
bb = ctx.message.author.id
17+
18+
#creation de l'embed pour le message du ban
19+
kembed=discord.Embed(title=f"{member} s'est fait expulser du serveur",color=0xff1100)
20+
kembed.add_field(name="raison :",value=reason)
21+
kembed.add_field(name="kick par :",value=f"<@!{bb}>")
22+
23+
#creation d'un channel mp
24+
a = await member.create_dm()
25+
26+
#envoi d messages au membre kick
27+
await a.send("tu a été kick du serveur !")
28+
await a.send(embed= kembed)
29+
30+
#kick du membre et envoi du message de ban
31+
await member.kick(reason=reason)
32+
await ctx.send(embed = kembed)
33+
34+
#commande de banissement
35+
@commands.command()
36+
@commands.has_permissions(kick_members=True, ban_members=True)
37+
async def ban(self,ctx, member : discord.Member, *, reason="pas de raison"):
38+
39+
#recup. de l'id de l'executeur de la commande
40+
bd = ctx.message.author.id
41+
42+
#creation de l'embed pour le message de ban
43+
bembed=discord.Embed(title=f"{member} s'est fait bannir du serveur",color=0xff1100 )
44+
bembed.add_field(name="raison :",value=reason)
45+
bembed.add_field(name="ban par :",value=f"<@!{bd}>")
46+
47+
#creation d'un chanell mp
48+
b = await member.create_dm()
49+
50+
#envoi de messages au membre banni
51+
await b.send("tu a été ban du server !")
52+
await b.send(embed = bembed)
53+
54+
#banissement du membre
55+
await member.ban(reason=reason)
56+
57+
#envoi de l'embed
58+
await ctx.send(embed = bembed)
59+
60+
@commands.command(pass_context=True)
61+
@commands.has_permissions(manage_messages=True)
62+
async def clear(self,ctx, amount = 10):
63+
await ctx.channel.purge(limit=amount)
64+
await ctx.send(f"{amount} messages supprimés !")
65+
time.sleep(0.5)
66+
await ctx.channel.purge(limit=1)
67+
68+
#commande d'annonce
69+
@commands.command()
70+
async def announce(self,ctx, *,args):
71+
#creation de l'embed de l'annonce avec l'argument de la commande
72+
ann = discord.Embed(description="__**ANNONCE :**__",color=0x24d12f)
73+
ann.add_field(name=":",value=args)
74+
75+
#envoi de l'embed
76+
await ctx.send(embed= ann)
77+
78+
79+
80+
def setup(client):
81+
client.add_cog(Staff(client))

commandes/utils.py

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import time
2+
import discord
3+
from discord.ext import commands
4+
import random
5+
6+
class Utils(commands.Cog):
7+
def __init__(self, bot):
8+
self.bot = bot
9+
10+
@commands.command()
11+
async def suggest(self,ctx, *,args):
12+
mem = ctx.message.author.id
13+
blbl = ctx.channel
14+
no = 1
15+
sugg = self.bot.get_channel(712593474834137173)
16+
sembed = discord.Embed(description=":bulb: __**--SUGGESTION--**__ :bulb: ",color=0x00FFAE)
17+
sembed.add_field(name=":incoming_envelope: |**Suggeré par** : ",value=f"<@!{mem}>",inline=False)
18+
sembed.add_field(name=":bulb: |**Suggestion** :",value=args,inline=False)
19+
message = await sugg.send(embed=sembed)
20+
await message.add_reaction("<:yes:715477940367917056>")
21+
await message.add_reaction("<:no:715477940288094248>")
22+
await ctx.send("**__ :white_check_mark: | Suggestion envoyée dans le salon prevu a cet effet !__**")
23+
24+
25+
26+
27+
28+
29+
30+
31+
32+
def setup(client):
33+
client.add_cog(Utils(client))

0 commit comments

Comments
 (0)