Compare commits
30 Commits
87465aface
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| a9795d0d9b | |||
| 1ee266de55 | |||
| 27c1bf357e | |||
| 1200aa59f2 | |||
| b6a98492e2 | |||
| 4f27d4f70a | |||
| 56cb582c12 | |||
| c23b84ab6d | |||
| 2a975337ce | |||
| 41b5c9dcb5 | |||
| 8166ab3e72 | |||
| 2b9ab1cb28 | |||
| 2afb6e3997 | |||
| 004e58b1ff | |||
| 4745939a72 | |||
| 26b4a78aee | |||
| 15930dae50 | |||
| c99495c113 | |||
| afcb257671 | |||
| eda68d51d8 | |||
|
|
11f75e97cd | ||
|
|
a92b066ecb | ||
|
|
4640d389a4 | ||
|
|
2c625c0c6c | ||
|
|
bc3f890825 | ||
|
|
8d46673092 | ||
|
|
def16f0760 | ||
|
|
28893789bb | ||
|
|
8b95218f84 | ||
|
|
1d5a126d44 |
@@ -16,8 +16,8 @@ jobs:
|
||||
pip install -r requirements.txt
|
||||
sudo apt install sshpass
|
||||
host: 172.17.0.1
|
||||
user: root
|
||||
pass: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
user: binlab
|
||||
pass: ${{ secrets.KEY }}
|
||||
args: '-vvv'
|
||||
|
||||
|
||||
@@ -28,14 +28,14 @@ jobs:
|
||||
- id: SFTPDeploy
|
||||
uses: https://github.com/wlixcc/SFTP-Deploy-Action@v1.2.4
|
||||
with:
|
||||
username: root
|
||||
username: binlab
|
||||
server: 172.17.0.1
|
||||
port: 22
|
||||
password: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
# clones entire github repo
|
||||
local_path: ./*
|
||||
# destination of the code on the server
|
||||
remote_path: /home/admin/${{ env.REPO_NAME }}/
|
||||
remote_path: /home/binlab/${{ env.REPO_NAME }}/
|
||||
password: ${{ secrets.KEY }}
|
||||
ssh_private_key: ignored
|
||||
|
||||
# you may or may not need this. It all depends on how your code retrieves your discord token
|
||||
@@ -51,13 +51,13 @@ jobs:
|
||||
uses: https://github.com/fifsky/ssh-action@master
|
||||
with:
|
||||
command: |
|
||||
cd ${{ env.REPO_NAME }}/lib/bot
|
||||
cd /dev/shm
|
||||
touch token.0
|
||||
echo ${{ env.BOT_TOKEN }} > token.0
|
||||
echo $?
|
||||
host: 172.17.0.1
|
||||
user: root
|
||||
pass: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
user: binlab
|
||||
pass: ${{ secrets.KEY }}
|
||||
|
||||
create-systemctl-service:
|
||||
needs: [add-bot-token, deploy-via-sftp]
|
||||
@@ -73,20 +73,20 @@ jobs:
|
||||
After=multi-user.target
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/python3 /home/admin/${{ env.REPO_NAME }}/main.py
|
||||
ExecStart=/usr/bin/python3 /home/binlab/${{ env.REPO_NAME }}/main.py
|
||||
User=root
|
||||
Restart=on-failure
|
||||
RestartSec=30
|
||||
WorkingDirectory=/home/admin/${{ env.REPO_NAME }}/
|
||||
WorkingDirectory=/home/binlab/${{ env.REPO_NAME }}/
|
||||
[Install]
|
||||
WantedBy=multi-user.target" >> /etc/systemd/system/${{ env.REPO_NAME }}.service
|
||||
chmod +x /root/${{ env.REPO_NAME }}/main.py
|
||||
chmod +x /home/binlab/${{ env.REPO_NAME }}/main.py
|
||||
sudo systemctl enable ${{ env.REPO_NAME }}.service
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl start ${{ env.REPO_NAME }}.service
|
||||
host: 172.17.0.1
|
||||
user: root
|
||||
pass: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
user: binlab
|
||||
pass: ${{ secrets.KEY }}
|
||||
|
||||
create-systemctl-restart:
|
||||
needs: [create-systemctl-service, add-bot-token, deploy-via-sftp]
|
||||
@@ -96,7 +96,7 @@ jobs:
|
||||
uses: https://github.com/fifsky/ssh-action@master
|
||||
with:
|
||||
command: |
|
||||
echo "[Unit]
|
||||
sudo echo "[Unit]
|
||||
Description=${{ env.REPO_NAME }} Discord Bot restart
|
||||
After=multi-user.target
|
||||
[Service]
|
||||
@@ -108,5 +108,5 @@ jobs:
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl start ${{ env.REPO_NAME }}-watcher.service
|
||||
host: 172.17.0.1
|
||||
user: root
|
||||
pass: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
user: binlab
|
||||
pass: ${{ secrets.KEY }}
|
||||
|
||||
@@ -13,12 +13,12 @@ jobs:
|
||||
- name: SFTP Deploy
|
||||
uses: https://github.com/wlixcc/SFTP-Deploy-Action@v1.2.4
|
||||
with:
|
||||
username: root
|
||||
username: binlab
|
||||
server: 172.17.0.1
|
||||
port: 22
|
||||
local_path: ./*
|
||||
remote_path: /home/admin/${{ env.REPO_NAME }}/
|
||||
ssh_private_key: ${{ env.SSH_PRIVATE_KEY }}
|
||||
remote_path: /home/binlab/${{ env.REPO_NAME }}/
|
||||
password: ${{ secrets.KEY }}
|
||||
|
||||
restart-bot:
|
||||
needs: [deploy-via-sftp]
|
||||
@@ -29,5 +29,5 @@ jobs:
|
||||
with:
|
||||
command: sudo systemctl start ${{ env.REPO_NAME }}-watcher.service &
|
||||
host: 172.17.0.1
|
||||
user: root
|
||||
pass: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
user: binlab
|
||||
pass: ${{ secrets.KEY }}
|
||||
4
cmds.txt
4
cmds.txt
@@ -40,8 +40,10 @@ stonks https://tenor.com/view/stonks-up-stongs-meme-stocks-gif-15715298
|
||||
|
||||
dolor https://media.discordapp.net/attachments/667159642199162901/1025800727853011005/Desgarre.gif https://media.tenor.com/-vmlqClGjecAAAAC/painful-chris-traeger.gif https://media.tenor.com/Njt51xxHbYgAAAAC/sore-back-sore.gif https://media.tenor.com/j9BeW6kXNb0AAAAC/dolor-copa-america.gif https://media.tenor.com/c5vNwNeDOXcAAAAd/me-duele-la-rodilla-me-torci.gif https://media.tenor.com/JWxQKmrP4fcAAAAC/disney-up.gif https://media.tenor.com/n72RY0zUBpwAAAAd/dolor-de-espalda-enchufe-tv.gif https://media.tenor.com/iv4iDH1AgqcAAAAd/mal-de-dos1.gif
|
||||
|
||||
bailar https://media.tenor.com/3sRGst4MU7AAAAAC/minecraft-minecraft-online.gif https://media.tenor.com/LUFs-A8Gx0MAAAAd/dance-dancing.gif https://media.tenor.com/-0eBuulMAA8AAAAC/dance.gif https://media.tenor.com/ZgIRCUMksogAAAAC/sing-crayon-shin-chan.gif https://media.tenor.com/dFsURp-wUdgAAAAC/sans-dance.gif https://media.tenor.com/SwP1P8kBP8MAAAAM/vegetta777-vegetta.gif https://media.tenor.com/0Cb4CZlbg5IAAAAC/luzu-karmaland.gif https://media.tenor.com/G-aauG3LEDwAAAAd/inazuma-eleven-inazuma-eleven-jack.gif
|
||||
bailar https://media.tenor.com/3sRGst4MU7AAAAAC/minecraft-minecraft-online.gif https://media.tenor.com/LUFs-A8Gx0MAAAAd/dance-dancing.gif https://media.tenor.com/-0eBuulMAA8AAAAC/dance.gif https://media.tenor.com/ZgIRCUMksogAAAAC/sing-crayon-shin-chan.gif https://media.tenor.com/dFsURp-wUdgAAAAC/sans-dance.gif https://media.tenor.com/SwP1P8kBP8MAAAAM/vegetta777-vegetta.gif https://media.tenor.com/0Cb4CZlbg5IAAAAC/luzu-karmaland.gif https://media.tenor.com/G-aauG3LEDwAAAAd/inazuma-eleven-inazuma-eleven-jack.gif https://cdn.discordapp.com/attachments/925439880954253324/1431320726878556392/image0.gif
|
||||
|
||||
wtf https://media.tenor.com/Jm0zWb4WsnAAAAAd/willyrex-bailando.gif https://media.tenor.com/BZXqwec-P2AAAAAC/what-wtf.gif https://media.tenor.com/EnRojaH2AH4AAAAC/confused-meme.gif https://tenor.com/view/bunny-what-huh-confused-gif-16384988 https://media.tenor.com/HnJpjRirG5UAAAAC/jackie-chan-meme.gif https://media.tenor.com/3uNzbnxnr90AAAAd/what-wtf.gif https://c.tenor.com/XmsP1zzo-G4AAAAd/huh-what-is-it.gif
|
||||
|
||||
musicpls https://open.spotify.com/playlist/1RTQm9p4auVQ2b9qHh8bHe?si=0d0dcc6b81e647c5 https://open.spotify.com/playlist/6t8xps2iUWwrTRFoGDx2YF?si=c598e2ebb1d84b31 https://open.spotify.com/playlist/5KoeRg68FugCy9UHCQtFUv?si=8094dd3cc9f64ae8 https://open.spotify.com/album/4jLw2cj03QQdeflXgnnMva?si=d-Ozuq-vT_emApm6n-rHkA https://open.spotify.com/playlist/51LVO7V3Y7xxn7jrPPbWuU?si=c4820d6308234518 https://open.spotify.com/album/3eKdGQuOgOOUBMNLrMu56z?si=qzdhUUfkR3S7kZUNZIo_MQ https://open.spotify.com/album/4yzargqiTUbJ9HxRjKqh6Y?si=7koRPC65TlSjrp65qeTaLg
|
||||
|
||||
hoponvc https://tenor.com/bLC5X.gif https://tenor.com/b0nvc.gif https://tenor.com/lsjlPS9qVCP.gif https://tenor.com/eXPNWSJHM1k.gif https://tenor.com/rzvrMXTIteu.gif https://tenor.com/rcHXRMRDLRe.gif https://tenor.com/bG5Lj.gif
|
||||
10
main.py
10
main.py
@@ -7,6 +7,7 @@ import time
|
||||
|
||||
|
||||
intents = discord.Intents.all()
|
||||
allowed_mentions = discord.AllowedMentions(everyone = True)
|
||||
# intents.members = True
|
||||
|
||||
bot = commands.Bot(intents=intents)
|
||||
@@ -92,7 +93,7 @@ async def add(ctx, attr: str, user: discord.Option(choices=[os.environ['N1'], os
|
||||
if attr.lower() not in msg.content.lower():
|
||||
await msg.edit(content=f'{msg.content}\n- {attr}')
|
||||
await ctx.respond(f"Característica añadida! ", ephemeral=True)
|
||||
await send_log(f"Característica añadida: {attr} por {ctx.user}")
|
||||
await send_log(f"Característica añadida: {attr} por {ctx.user} en {user}")
|
||||
|
||||
else:
|
||||
await ctx.respond("Característica ya añadida!", ephemeral=True)
|
||||
@@ -122,7 +123,7 @@ async def delete(ctx, attr: str, user: discord.Option(choices=[os.environ['N1'],
|
||||
|
||||
await msg.edit(content=f'{msg.content.replace(f"{NL}- {attr}", "")}')
|
||||
await ctx.respond("Característica eliminada :(", ephemeral=True)
|
||||
await send_log(f"Característica eliminada: {attr} por {ctx.user}")
|
||||
await send_log(f"Característica eliminada: {attr} por {ctx.user} en {user}")
|
||||
return
|
||||
|
||||
else:
|
||||
@@ -151,7 +152,6 @@ async def mensaje_jueves():
|
||||
except Exception as e:
|
||||
await send_log(f"rip. Error: ```{e}```")
|
||||
|
||||
|
||||
@tasks.loop(hours = 1)
|
||||
async def horario_enviar():
|
||||
try:
|
||||
@@ -213,12 +213,14 @@ async def rima(ctx, message):
|
||||
elif message.content.lower().endswith("jueves") and message.author != bot.user:
|
||||
await ctx.reply(random.choices(["https://media.tenor.com/riA830QHvC8AAAAC/feliz-jueves-asuka.gif","https://media.tenor.com/L2-mDROrwgwAAAAd/racism.gif"], k=1, weights=[9,1])[0], mention_author=True)
|
||||
|
||||
elif message.content.lower().endswith("jueves ** **") and message.author == 518377522485002241:
|
||||
elif message.content.lower().endswith("jueves ** **") and message.author.id == 518377522485002241:
|
||||
await ctx.reply("https://media.tenor.com/L2-mDROrwgwAAAAd/racism.gif", mention_author=True)
|
||||
|
||||
elif any(i in message.content for i in ("33", "treinta y tres")) and message.author != bot.user:
|
||||
await ctx.reply("https://tenor.com/view/fernando-alonso-live-fernando-reaction-alonso-fernando-live-reaction-gif-1814768510923235803", delete_after=5)
|
||||
|
||||
elif message.content.lower() == "!evau" and message.author.id == 518377522485002241:
|
||||
await mandar_ebau()
|
||||
except Exception as e:
|
||||
await send_log(f"rip. Error: ```{e}```")
|
||||
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
Flask~=2.2.2
|
||||
py-cord~=2.4.1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user