init
This commit is contained in:
3
.idea/.gitignore
generated
vendored
Normal file
3
.idea/.gitignore
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# Default ignored files
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
||||||
10
.idea/discord-bot.iml
generated
Normal file
10
.idea/discord-bot.iml
generated
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="PYTHON_MODULE" version="4">
|
||||||
|
<component name="NewModuleRootManager">
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/venv" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
6
.idea/encodings.xml
generated
Normal file
6
.idea/encodings.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="Encoding">
|
||||||
|
<file url="file://$PROJECT_DIR$/sqlite_python.db" charset="windows-1251" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
20
.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
20
.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
<component name="InspectionProjectProfileManager">
|
||||||
|
<profile version="1.0">
|
||||||
|
<option name="myName" value="Project Default" />
|
||||||
|
<inspection_tool class="PyClassicStyleClassInspection" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="PyCompatibilityInspection" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="ourVersions">
|
||||||
|
<value>
|
||||||
|
<list size="1">
|
||||||
|
<item index="0" class="java.lang.String" itemvalue="3.11" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</option>
|
||||||
|
</inspection_tool>
|
||||||
|
<inspection_tool class="SpellCheckingInspection" enabled="true" level="INFORMATION" enabled_by_default="true">
|
||||||
|
<option name="processCode" value="true" />
|
||||||
|
<option name="processLiterals" value="true" />
|
||||||
|
<option name="processComments" value="true" />
|
||||||
|
</inspection_tool>
|
||||||
|
</profile>
|
||||||
|
</component>
|
||||||
6
.idea/inspectionProfiles/profiles_settings.xml
generated
Normal file
6
.idea/inspectionProfiles/profiles_settings.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<component name="InspectionProjectProfileManager">
|
||||||
|
<settings>
|
||||||
|
<option name="USE_PROJECT_PROFILE" value="false" />
|
||||||
|
<version value="1.0" />
|
||||||
|
</settings>
|
||||||
|
</component>
|
||||||
4
.idea/misc.xml
generated
Normal file
4
.idea/misc.xml
generated
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.9 (discord-bot)" project-jdk-type="Python SDK" />
|
||||||
|
</project>
|
||||||
8
.idea/modules.xml
generated
Normal file
8
.idea/modules.xml
generated
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectModuleManager">
|
||||||
|
<modules>
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/.idea/discord-bot.iml" filepath="$PROJECT_DIR$/.idea/discord-bot.iml" />
|
||||||
|
</modules>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
6
.idea/vcs.xml
generated
Normal file
6
.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
BIN
audio/1.mp3
Normal file
BIN
audio/1.mp3
Normal file
Binary file not shown.
BIN
audio/Escape From Tarkov - Взорвать его нахуй.mp3
Normal file
BIN
audio/Escape From Tarkov - Взорвать его нахуй.mp3
Normal file
Binary file not shown.
BIN
audio/Escape From Tarkov - Внимание Справа, Внимание Слева.mp3
Normal file
BIN
audio/Escape From Tarkov - Внимание Справа, Внимание Слева.mp3
Normal file
Binary file not shown.
BIN
audio/Escape From Tarkov - Все за мной, Выдвигаюсь.mp3
Normal file
BIN
audio/Escape From Tarkov - Все за мной, Выдвигаюсь.mp3
Normal file
Binary file not shown.
Binary file not shown.
BIN
audio/Escape From Tarkov - И хуй мой танцевал чечетку.mp3
Normal file
BIN
audio/Escape From Tarkov - И хуй мой танцевал чечетку.mp3
Normal file
Binary file not shown.
BIN
audio/Escape From Tarkov - На бля, на жри сука.mp3
Normal file
BIN
audio/Escape From Tarkov - На бля, на жри сука.mp3
Normal file
Binary file not shown.
BIN
audio/Escape From Tarkov - Ништяк пацаны, сегодня кайфуем.mp3
Normal file
BIN
audio/Escape From Tarkov - Ништяк пацаны, сегодня кайфуем.mp3
Normal file
Binary file not shown.
BIN
audio/Escape From Tarkov - Нормальн-нормальн живем пацаны.mp3
Normal file
BIN
audio/Escape From Tarkov - Нормальн-нормальн живем пацаны.mp3
Normal file
Binary file not shown.
BIN
audio/Escape From Tarkov - Ну и чо тут за хуйня.mp3
Normal file
BIN
audio/Escape From Tarkov - Ну и чо тут за хуйня.mp3
Normal file
Binary file not shown.
BIN
audio/Escape From Tarkov - Ну чё начало дня уже не плохое.mp3
Normal file
BIN
audio/Escape From Tarkov - Ну чё начало дня уже не плохое.mp3
Normal file
Binary file not shown.
BIN
audio/Escape From Tarkov - О ништяк шкура цела уже не плохо.mp3
Normal file
BIN
audio/Escape From Tarkov - О ништяк шкура цела уже не плохо.mp3
Normal file
Binary file not shown.
BIN
audio/Escape From Tarkov - О пиздарики на воздушном шарике.mp3
Normal file
BIN
audio/Escape From Tarkov - О пиздарики на воздушном шарике.mp3
Normal file
Binary file not shown.
BIN
audio/Escape From Tarkov - С утра выпил день свободен.mp3
Normal file
BIN
audio/Escape From Tarkov - С утра выпил день свободен.mp3
Normal file
Binary file not shown.
BIN
audio/Escape From Tarkov - Смех дикого.mp3
Normal file
BIN
audio/Escape From Tarkov - Смех дикого.mp3
Normal file
Binary file not shown.
BIN
audio/Escape From Tarkov - Сука ты и упырь гнида.mp3
Normal file
BIN
audio/Escape From Tarkov - Сука ты и упырь гнида.mp3
Normal file
Binary file not shown.
BIN
audio/Escape From Tarkov - Чики брики - пальчик выкинь.mp3
Normal file
BIN
audio/Escape From Tarkov - Чики брики - пальчик выкинь.mp3
Normal file
Binary file not shown.
Binary file not shown.
39
main.py
Normal file
39
main.py
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
import sys
|
||||||
|
import threading
|
||||||
|
import logging
|
||||||
|
import discord
|
||||||
|
import ffmpeg
|
||||||
|
from discord import guild, FFmpegPCMAudio
|
||||||
|
|
||||||
|
from discord.ext import commands
|
||||||
|
|
||||||
|
threading.current_thread().name = "main"
|
||||||
|
logging.basicConfig(stream=sys.stdout, filemode='w', level='INFO',
|
||||||
|
format='%(asctime)s - %(levelname)s - %(threadName)s - %(message)s')
|
||||||
|
|
||||||
|
bot = commands.Bot(command_prefix='$')
|
||||||
|
|
||||||
|
|
||||||
|
@bot.event
|
||||||
|
async def on_voice_state_update(member, before, after):
|
||||||
|
channel = bot.get_channel(947075464256712724)
|
||||||
|
print(member)
|
||||||
|
_memb = 260050236813082624
|
||||||
|
if before.channel == None:
|
||||||
|
await channel.send(f'{member.mention} ах ты ебаглаз')
|
||||||
|
voice_client: discord.VoiceClient = discord.utils.get(bot.voice_clients, guild=guild)
|
||||||
|
audio_source = FFmpegPCMAudio('audio/1.mp3')
|
||||||
|
if not voice_client.is_playing():
|
||||||
|
voice_client.play(audio_source, after=None)
|
||||||
|
if after.channel == None:
|
||||||
|
await channel.send(f'{member.mention} ты куда пошел?')
|
||||||
|
|
||||||
|
|
||||||
|
@bot.event
|
||||||
|
async def on_ready():
|
||||||
|
logging.info(f'Bot started')
|
||||||
|
|
||||||
|
|
||||||
|
bot.run('OTQ2ODE5MDA0MzE0NTcwODUy.YhkP6Q.dhFqi2MJMrxzHt5FtjK5Cl-5BI8')
|
||||||
|
|
||||||
|
# if __name__ == '__main__':
|
||||||
BIN
sqlite_python.db
Normal file
BIN
sqlite_python.db
Normal file
Binary file not shown.
Reference in New Issue
Block a user