├── Episode 01 ├── index.js └── package.json ├── Episode 02 ├── commands │ ├── ping.js │ └── youtube.js ├── config.json ├── index.js └── package.json ├── Episode 03 ├── commands │ ├── ping.js │ ├── purge.js │ ├── welcome.js │ └── youtube.js ├── config.json ├── index.js └── package.json ├── Episode 04 ├── commands │ ├── ping.js │ ├── purge.js │ ├── welcome.js │ └── youtube.js ├── config.json ├── index.js └── package.json ├── Episode 05 ├── commands │ ├── command-base.js │ ├── load-commands.js │ ├── ping.js │ ├── purge.js │ ├── welcome.js │ └── youtube.js ├── config.json ├── index.js └── package.json ├── Episode 06 ├── commands │ ├── Fun │ │ ├── ping.js │ │ └── youtube.js │ ├── Mod │ │ ├── mute.js │ │ ├── purge.js │ │ ├── tempmute.js │ │ ├── unmute.js │ │ └── welcome.js │ ├── command-base.js │ └── load-commands.js ├── config.json ├── index.js └── package.json ├── Episode 07 ├── commands │ ├── Fun │ │ ├── ping.js │ │ └── youtube.js │ ├── Mod │ │ ├── ban.js │ │ ├── kick.js │ │ ├── mute.js │ │ ├── purge.js │ │ ├── tepmmute.js │ │ ├── unmute.js │ │ └── welcome.js │ ├── command-base.js │ └── load-commads.js ├── config.json ├── index.js └── package.json ├── Episode 08 ├── commands │ ├── Fun │ │ ├── ping.js │ │ └── youtube.js │ ├── Mod │ │ ├── ban.js │ │ ├── kick.js │ │ ├── mute.js │ │ ├── purge.js │ │ ├── tempban.js │ │ ├── tepmmute.js │ │ ├── unban.js │ │ ├── unmute.js │ │ └── welcome.js │ ├── command-base.js │ └── load-commands.js ├── config.json ├── index.js └── package.json ├── Episode 09 ├── commands │ ├── Fun │ │ ├── ping.js │ │ └── youtube.js │ ├── Mod │ │ ├── ban.js │ │ ├── kick.js │ │ ├── mute.js │ │ ├── purge.js │ │ ├── tempban.js │ │ ├── tepmmute.js │ │ ├── unban.js │ │ ├── unmute.js │ │ └── welcome.js │ ├── Music │ │ └── play.js │ ├── command-base.js │ └── load-commands.js ├── config.json ├── index.js └── package.json ├── Episode 10 ├── commands │ ├── Fun │ │ ├── ping.js │ │ └── youtube.js │ ├── Mod │ │ ├── ban.js │ │ ├── kick.js │ │ ├── mute.js │ │ ├── purge.js │ │ ├── tempban.js │ │ ├── tepmmute.js │ │ ├── unban.js │ │ ├── unmute.js │ │ └── welcome.js │ ├── Music │ │ ├── play.js │ │ ├── queue.js │ │ └── stop.js │ ├── command-base.js │ └── load-commands.js ├── config.json ├── index.js └── package.json ├── Episode 11 ├── commands │ ├── Fun │ │ ├── ping.js │ │ └── youtube.js │ ├── Mod │ │ ├── ban.js │ │ ├── kick.js │ │ ├── mute.js │ │ ├── purge.js │ │ ├── tempban.js │ │ ├── tepmmute.js │ │ ├── unban.js │ │ ├── unmute.js │ │ └── welcome.js │ ├── Music │ │ ├── play.js │ │ ├── queue.js │ │ ├── remove.js │ │ ├── skip.js │ │ └── stop.js │ ├── command-base.js │ └── load-commands.js ├── config.json ├── index.js └── package.json ├── Episode 12 ├── commands │ ├── Fun │ │ ├── ping.js │ │ └── youtube.js │ ├── Mod │ │ ├── ban.js │ │ ├── kick.js │ │ ├── mute.js │ │ ├── purge.js │ │ ├── tempban.js │ │ ├── tepmmute.js │ │ ├── unban.js │ │ ├── unmute.js │ │ └── welcome.js │ ├── Music │ │ ├── pause.js │ │ ├── play.js │ │ ├── queue.js │ │ ├── remove.js │ │ ├── resume.js │ │ ├── skip.js │ │ └── stop.js │ ├── command-base.js │ └── load-commands.js ├── config.json ├── index.js └── package.json ├── Episode 13 ├── commands │ ├── Fun │ │ ├── ping.js │ │ └── youtube.js │ ├── Mod │ │ ├── ban.js │ │ ├── kick.js │ │ ├── mute.js │ │ ├── purge.js │ │ ├── tempban.js │ │ ├── tepmmute.js │ │ ├── unban.js │ │ ├── unmute.js │ │ └── welcome.js │ ├── Music │ │ ├── np.js │ │ ├── pause.js │ │ ├── play.js │ │ ├── queue.js │ │ ├── remove.js │ │ ├── resume.js │ │ ├── skip.js │ │ ├── stop.js │ │ └── volume.js │ ├── command-base.js │ └── load-commands.js ├── config.json ├── index.js └── package.json ├── Episode 14 ├── commands │ ├── Fun │ │ ├── ping.js │ │ └── youtube.js │ ├── Mod │ │ ├── ban.js │ │ ├── kick.js │ │ ├── mute.js │ │ ├── purge.js │ │ ├── tempban.js │ │ ├── tepmmute.js │ │ ├── unban.js │ │ ├── unmute.js │ │ └── welcome.js │ ├── Music │ │ ├── np.js │ │ ├── pause.js │ │ ├── play.js │ │ ├── queue.js │ │ ├── remove.js │ │ ├── resume.js │ │ ├── skip.js │ │ ├── stop.js │ │ └── volume.js │ ├── command-base.js │ └── load-commands.js ├── config.json ├── index.js └── package.json ├── Episode 15 ├── commands │ ├── Fun │ │ ├── ping.js │ │ └── youtube.js │ ├── Info │ │ └── user-info.js │ ├── Mod │ │ ├── ban.js │ │ ├── kick.js │ │ ├── mute.js │ │ ├── purge.js │ │ ├── tempban.js │ │ ├── tepmmute.js │ │ ├── unban.js │ │ ├── unmute.js │ │ └── welcome.js │ ├── Music │ │ ├── np.js │ │ ├── pause.js │ │ ├── play.js │ │ ├── queue.js │ │ ├── remove.js │ │ ├── resume.js │ │ ├── skip.js │ │ ├── stop.js │ │ └── volume.js │ ├── command-base.js │ └── load-commands.js ├── config.json ├── index.js └── package.json ├── Episode 16 ├── commands │ ├── Fun │ │ ├── ping.js │ │ └── youtube.js │ ├── Info │ │ ├── server-info.js │ │ └── user-info.js │ ├── Mod │ │ ├── ban.js │ │ ├── kick.js │ │ ├── mute.js │ │ ├── purge.js │ │ ├── tempban.js │ │ ├── tepmmute.js │ │ ├── unban.js │ │ ├── unmute.js │ │ └── welcome.js │ ├── Music │ │ ├── np.js │ │ ├── pause.js │ │ ├── play.js │ │ ├── queue.js │ │ ├── remove.js │ │ ├── resume.js │ │ ├── skip.js │ │ ├── stop.js │ │ └── volume.js │ ├── command-base.js │ └── load-commands.js ├── config.json ├── index.js └── package.json ├── Episode 17 ├── commands │ ├── Fun │ │ ├── ping.js │ │ └── youtube.js │ ├── Info │ │ ├── server-info.js │ │ └── user-info.js │ ├── Mod │ │ ├── ban.js │ │ ├── kick.js │ │ ├── mute.js │ │ ├── purge.js │ │ ├── tempban.js │ │ ├── tepmmute.js │ │ ├── unban.js │ │ ├── unmute.js │ │ └── welcome.js │ ├── Music │ │ ├── np.js │ │ ├── pause.js │ │ ├── play.js │ │ ├── queue.js │ │ ├── remove.js │ │ ├── resume.js │ │ ├── skip.js │ │ ├── stop.js │ │ └── volume.js │ ├── Search │ │ └── djs-docs.js │ ├── command-base.js │ └── load-commands.js ├── config.json ├── index.js └── package.json ├── Episode 18 ├── commands │ ├── Fun │ │ ├── ping.js │ │ └── youtube.js │ ├── Info │ │ ├── server-info.js │ │ └── user-info.js │ ├── Mod │ │ ├── ban.js │ │ ├── kick.js │ │ ├── mute.js │ │ ├── purge.js │ │ ├── tempban.js │ │ ├── tepmmute.js │ │ ├── unban.js │ │ ├── unmute.js │ │ └── welcome.js │ ├── Music │ │ ├── np.js │ │ ├── pause.js │ │ ├── play.js │ │ ├── queue.js │ │ ├── remove.js │ │ ├── resume.js │ │ ├── skip.js │ │ ├── stop.js │ │ └── volume.js │ ├── Search │ │ ├── djs-docs.js │ │ └── npm.js │ ├── command-base.js │ └── load-commands.js ├── config.json ├── index.js └── package.json ├── Episode 19 ├── commands │ ├── Fun │ │ ├── ping.js │ │ └── youtube.js │ ├── Info │ │ ├── server-info.js │ │ └── user-info.js │ ├── Mod │ │ ├── ban.js │ │ ├── kick.js │ │ ├── mute.js │ │ ├── purge.js │ │ ├── tempban.js │ │ ├── tepmmute.js │ │ ├── unban.js │ │ ├── unmute.js │ │ └── welcome.js │ ├── Music │ │ ├── np.js │ │ ├── pause.js │ │ ├── play.js │ │ ├── queue.js │ │ ├── remove.js │ │ ├── resume.js │ │ ├── skip.js │ │ ├── stop.js │ │ └── volume.js │ ├── Search │ │ ├── djs-docs.js │ │ ├── github.js │ │ └── npm.js │ ├── command-base.js │ └── load-commands.js ├── config.json ├── index.js └── package.json ├── Episode 20 ├── commands │ ├── Fun │ │ ├── ping.js │ │ └── youtube.js │ ├── Info │ │ ├── server-info.js │ │ └── user-info.js │ ├── Mod │ │ ├── ban.js │ │ ├── kick.js │ │ ├── mute.js │ │ ├── purge.js │ │ ├── tempban.js │ │ ├── tepmmute.js │ │ ├── unban.js │ │ ├── unmute.js │ │ └── welcome.js │ ├── Music │ │ ├── np.js │ │ ├── pause.js │ │ ├── play.js │ │ ├── queue.js │ │ ├── remove.js │ │ ├── resume.js │ │ ├── skip.js │ │ ├── stop.js │ │ └── volume.js │ ├── Search │ │ ├── djs-docs.js │ │ ├── github.js │ │ ├── npm.js │ │ └── wiki.js │ ├── command-base.js │ └── load-commands.js ├── config.json ├── index.js └── package.json ├── Episode 21 ├── commands │ ├── Fun │ │ ├── ping.js │ │ ├── suggest.js │ │ └── youtube.js │ ├── Info │ │ ├── server-info.js │ │ └── user-info.js │ ├── Mod │ │ ├── ban.js │ │ ├── kick.js │ │ ├── mute.js │ │ ├── purge.js │ │ ├── tempban.js │ │ ├── tepmmute.js │ │ ├── unban.js │ │ ├── unmute.js │ │ └── welcome.js │ ├── Music │ │ ├── np.js │ │ ├── pause.js │ │ ├── play.js │ │ ├── queue.js │ │ ├── remove.js │ │ ├── resume.js │ │ ├── skip.js │ │ ├── stop.js │ │ └── volume.js │ ├── Search │ │ ├── djs-docs.js │ │ ├── github.js │ │ ├── npm.js │ │ └── wiki.js │ ├── command-base.js │ └── load-commands.js ├── config.json ├── index.js └── package.json ├── Episode 22 ├── commands │ ├── Fun │ │ ├── ping.js │ │ ├── suggest.js │ │ └── youtube.js │ ├── Info │ │ ├── server-info.js │ │ └── user-info.js │ ├── Mod │ │ ├── ban.js │ │ ├── kick.js │ │ ├── mute.js │ │ ├── purge.js │ │ ├── tempban.js │ │ ├── tepmmute.js │ │ ├── unban.js │ │ ├── unmute.js │ │ └── welcome.js │ ├── Music │ │ ├── np.js │ │ ├── pause.js │ │ ├── play.js │ │ ├── queue.js │ │ ├── remove.js │ │ ├── resume.js │ │ ├── skip.js │ │ ├── stop.js │ │ └── volume.js │ ├── Search │ │ ├── djs-docs.js │ │ ├── github.js │ │ ├── npm.js │ │ └── wiki.js │ ├── Ticket │ │ ├── close.js │ │ ├── create-command.js │ │ ├── create.js │ │ └── setup.js │ ├── command-base.js │ └── load-commands.js ├── config.json ├── index.js └── package.json ├── Episode 23 ├── commands │ ├── Fun │ │ ├── ping.js │ │ ├── suggest.js │ │ └── youtube.js │ ├── Info │ │ ├── server-info.js │ │ └── user-info.js │ ├── Mod │ │ ├── ban.js │ │ ├── kick.js │ │ ├── member-count.js │ │ ├── mute.js │ │ ├── purge.js │ │ ├── tempban.js │ │ ├── tepmmute.js │ │ ├── unban.js │ │ ├── unmute.js │ │ └── welcome.js │ ├── Music │ │ ├── np.js │ │ ├── pause.js │ │ ├── play.js │ │ ├── queue.js │ │ ├── remove.js │ │ ├── resume.js │ │ ├── skip.js │ │ ├── stop.js │ │ └── volume.js │ ├── Search │ │ ├── djs-docs.js │ │ ├── github.js │ │ ├── npm.js │ │ └── wiki.js │ ├── Ticket │ │ ├── close.js │ │ ├── create-command.js │ │ ├── create.js │ │ └── setup.js │ ├── command-base.js │ └── load-commands.js ├── config.json ├── index.js └── package.json ├── Episode 24 ├── commands │ ├── Fun │ │ ├── ping.js │ │ ├── suggest.js │ │ └── youtube.js │ ├── Info │ │ ├── server-info.js │ │ └── user-info.js │ ├── Mod │ │ ├── ban.js │ │ ├── kick.js │ │ ├── member-count.js │ │ ├── mute.js │ │ ├── purge.js │ │ ├── tempban.js │ │ ├── tepmmute.js │ │ ├── unban.js │ │ ├── unmute.js │ │ └── welcome.js │ ├── Music │ │ ├── np.js │ │ ├── pause.js │ │ ├── play.js │ │ ├── queue.js │ │ ├── remove.js │ │ ├── resume.js │ │ ├── skip.js │ │ ├── stop.js │ │ └── volume.js │ ├── Reaction-Roles │ │ ├── react-roles.js │ │ └── setup.js │ ├── Search │ │ ├── djs-docs.js │ │ ├── github.js │ │ ├── npm.js │ │ └── wiki.js │ ├── Ticket │ │ ├── close.js │ │ ├── create-command.js │ │ ├── create.js │ │ └── setup.js │ ├── command-base.js │ └── load-commands.js ├── config.json ├── index.js ├── package.json └── utils │ └── EditMessage.js ├── Episode 25 ├── commands │ ├── Fun │ │ ├── ping.js │ │ ├── suggest.js │ │ └── youtube.js │ ├── Info │ │ ├── server-info.js │ │ └── user-info.js │ ├── Mod │ │ ├── ban.js │ │ ├── embed.js │ │ ├── kick.js │ │ ├── member-count.js │ │ ├── mute.js │ │ ├── purge.js │ │ ├── tempban.js │ │ ├── tepmmute.js │ │ ├── unban.js │ │ ├── unmute.js │ │ └── welcome.js │ ├── Music │ │ ├── np.js │ │ ├── pause.js │ │ ├── play.js │ │ ├── queue.js │ │ ├── remove.js │ │ ├── resume.js │ │ ├── skip.js │ │ ├── stop.js │ │ └── volume.js │ ├── Reaction-Roles │ │ ├── react-roles.js │ │ └── setup.js │ ├── Search │ │ ├── djs-docs.js │ │ ├── github.js │ │ ├── npm.js │ │ └── wiki.js │ ├── Ticket │ │ ├── close.js │ │ ├── create-command.js │ │ ├── create.js │ │ └── setup.js │ ├── command-base.js │ └── load-commands.js ├── config.json ├── index.js ├── package.json └── utils │ └── EditMessage.js ├── Episode 26 ├── commands │ ├── Economy │ │ ├── balance.js │ │ └── beg.js │ ├── Fun │ │ ├── ping.js │ │ ├── suggest.js │ │ └── youtube.js │ ├── Info │ │ ├── server-info.js │ │ └── user-info.js │ ├── Mod │ │ ├── ban.js │ │ ├── embed.js │ │ ├── kick.js │ │ ├── member-count.js │ │ ├── mute.js │ │ ├── purge.js │ │ ├── tempban.js │ │ ├── tepmmute.js │ │ ├── unban.js │ │ ├── unmute.js │ │ └── welcome.js │ ├── Music │ │ ├── np.js │ │ ├── pause.js │ │ ├── play.js │ │ ├── queue.js │ │ ├── remove.js │ │ ├── resume.js │ │ ├── skip.js │ │ ├── stop.js │ │ └── volume.js │ ├── Reaction-Roles │ │ ├── react-roles.js │ │ └── setup.js │ ├── Search │ │ ├── djs-docs.js │ │ ├── github.js │ │ ├── npm.js │ │ └── wiki.js │ ├── Ticket │ │ ├── close.js │ │ ├── create-command.js │ │ ├── create.js │ │ └── setup.js │ ├── command-base.js │ └── load-commands.js ├── config.json ├── index.js ├── package.json └── utils │ └── EditMessage.js ├── Episode 27 ├── commands │ ├── Economy │ │ ├── addmoney.js │ │ ├── balance.js │ │ ├── beg.js │ │ └── removemoney.js │ ├── Fun │ │ ├── ping.js │ │ ├── suggest.js │ │ └── youtube.js │ ├── Info │ │ ├── server-info.js │ │ └── user-info.js │ ├── Mod │ │ ├── ban.js │ │ ├── embed.js │ │ ├── kick.js │ │ ├── member-count.js │ │ ├── mute.js │ │ ├── purge.js │ │ ├── tempban.js │ │ ├── tepmmute.js │ │ ├── unban.js │ │ ├── unmute.js │ │ └── welcome.js │ ├── Music │ │ ├── np.js │ │ ├── pause.js │ │ ├── play.js │ │ ├── queue.js │ │ ├── remove.js │ │ ├── resume.js │ │ ├── skip.js │ │ ├── stop.js │ │ └── volume.js │ ├── Reaction-Roles │ │ ├── react-roles.js │ │ └── setup.js │ ├── Search │ │ ├── djs-docs.js │ │ ├── github.js │ │ ├── npm.js │ │ └── wiki.js │ ├── Ticket │ │ ├── close.js │ │ ├── create-command.js │ │ ├── create.js │ │ └── setup.js │ ├── command-base.js │ └── load-commands.js ├── config.json ├── index.js ├── package.json └── utils │ └── EditMessage.js ├── Episode 30 ├── Images │ └── welcome.png ├── commands │ ├── Main-Commands │ │ ├── Economy │ │ │ ├── addmoney.js │ │ │ ├── balance.js │ │ │ ├── beg.js │ │ │ ├── deposit.js │ │ │ ├── lb.js │ │ │ ├── removemoney.js │ │ │ ├── rob.js │ │ │ └── withdraw.js │ │ ├── Fun │ │ │ ├── chatbot.js │ │ │ ├── ping.js │ │ │ ├── suggest.js │ │ │ └── youtube.js │ │ ├── Info │ │ │ ├── server-info.js │ │ │ ├── uptime.js │ │ │ └── user-info.js │ │ ├── Mod │ │ │ ├── ban.js │ │ │ ├── embed.js │ │ │ ├── kick.js │ │ │ ├── member-count.js │ │ │ ├── mute.js │ │ │ ├── purge.js │ │ │ ├── tempban.js │ │ │ ├── tepmmute.js │ │ │ ├── unban.js │ │ │ ├── unmute.js │ │ │ └── welcome.js │ │ ├── Music │ │ │ ├── np.js │ │ │ ├── pause.js │ │ │ ├── play.js │ │ │ ├── queue.js │ │ │ ├── remove.js │ │ │ ├── resume.js │ │ │ ├── skip.js │ │ │ ├── stop.js │ │ │ └── volume.js │ │ ├── Reaction-Roles │ │ │ ├── react-roles.js │ │ │ └── setup.js │ │ ├── Search │ │ │ ├── djs-docs.js │ │ │ ├── github.js │ │ │ ├── npm.js │ │ │ └── wiki.js │ │ └── Ticket │ │ │ ├── close.js │ │ │ ├── create-command.js │ │ │ ├── create.js │ │ │ └── setup.js │ ├── Per-Server-Commands │ │ ├── Reset │ │ │ ├── resetcahtbot.js │ │ │ └── resetprefix.js │ │ └── Set │ │ │ ├── setchatbot.js │ │ │ └── setprefix.js │ ├── commands-base.js │ └── load-commands.js ├── config.json ├── index.js ├── package.json └── utils │ └── EditMessage.js ├── Episode 40 ├── Images │ └── welcome.png ├── commands │ ├── Main-Commands │ │ ├── Economy │ │ │ ├── addmoney.js │ │ │ ├── balance.js │ │ │ ├── beg.js │ │ │ ├── deposit.js │ │ │ ├── lb.js │ │ │ ├── removemoney.js │ │ │ ├── rob.js │ │ │ └── withdraw.js │ │ ├── Fun │ │ │ ├── chatbot.js │ │ │ ├── nickname.js │ │ │ ├── ping.js │ │ │ ├── suggest.js │ │ │ └── youtube.js │ │ ├── Info │ │ │ ├── bot-info.js │ │ │ ├── server-info.js │ │ │ ├── uptime.js │ │ │ └── user-info.js │ │ ├── Mod │ │ │ ├── ban.js │ │ │ ├── create-role.js │ │ │ ├── embed.js │ │ │ ├── kick.js │ │ │ ├── member-count.js │ │ │ ├── mute.js │ │ │ ├── purge.js │ │ │ ├── tempban.js │ │ │ ├── tepmmute.js │ │ │ ├── unban.js │ │ │ ├── unmute.js │ │ │ ├── unwarn.js │ │ │ ├── warn.js │ │ │ ├── warnings.js │ │ │ └── welcome.js │ │ ├── Music │ │ │ ├── np.js │ │ │ ├── pause.js │ │ │ ├── play.js │ │ │ ├── queue.js │ │ │ ├── remove.js │ │ │ ├── resume.js │ │ │ ├── skip.js │ │ │ ├── stop.js │ │ │ └── volume.js │ │ ├── Reaction-Roles │ │ │ ├── react-roles.js │ │ │ └── setup.js │ │ ├── Search │ │ │ ├── djs-docs.js │ │ │ ├── github.js │ │ │ ├── npm.js │ │ │ └── wiki.js │ │ └── Ticket │ │ │ ├── Command │ │ │ ├── close.js │ │ │ ├── create.js │ │ │ ├── lock.js │ │ │ ├── transcript.js │ │ │ └── unlock.js │ │ │ ├── Reaction │ │ │ ├── create-coding.js │ │ │ ├── create-common.js │ │ │ ├── create-giveaway.js │ │ │ └── setup.js │ │ │ ├── add.js │ │ │ ├── remove.js │ │ │ └── stat.js │ ├── Per-Server-Commands │ │ ├── Reset │ │ │ ├── resetcahtbot.js │ │ │ └── resetprefix.js │ │ └── Set │ │ │ ├── setchatbot.js │ │ │ └── setprefix.js │ ├── command-base.js │ └── load-commands.js ├── config.json ├── index.js ├── package.json └── utils │ └── EditMessage.js ├── Episode 45 ├── commands │ ├── Main-Commands │ │ ├── Economy │ │ │ ├── Shop │ │ │ │ ├── Buy │ │ │ │ │ ├── fish-rod.js │ │ │ │ │ └── laptop.js │ │ │ │ ├── Sell │ │ │ │ │ ├── fish-rod.js │ │ │ │ │ └── laptop.js │ │ │ │ └── shop.js │ │ │ ├── addmoney.js │ │ │ ├── balance.js │ │ │ ├── beg.js │ │ │ ├── daily.js │ │ │ ├── deposit.js │ │ │ ├── lb.js │ │ │ ├── monthly.js │ │ │ ├── removemoney.js │ │ │ ├── rob.js │ │ │ ├── weekly.js │ │ │ └── withdraw.js │ │ ├── Fun │ │ │ ├── chatbot.js │ │ │ ├── nickname.js │ │ │ ├── ping.js │ │ │ ├── suggest.js │ │ │ └── youtube.js │ │ ├── GiveAways │ │ │ ├── delete.js │ │ │ ├── edit.js │ │ │ ├── end.js │ │ │ ├── re-roll.js │ │ │ └── start.js │ │ ├── Info │ │ │ ├── bot-info.js │ │ │ ├── server-info.js │ │ │ ├── uptime.js │ │ │ └── user-info.js │ │ ├── Mod │ │ │ ├── ban.js │ │ │ ├── create-role.js │ │ │ ├── embed.js │ │ │ ├── kick.js │ │ │ ├── member-count.js │ │ │ ├── mute.js │ │ │ ├── purge.js │ │ │ ├── tempban.js │ │ │ ├── tepmmute.js │ │ │ ├── unban.js │ │ │ ├── unmute.js │ │ │ ├── unwarn.js │ │ │ ├── warn.js │ │ │ ├── warnings.js │ │ │ └── welcome.js │ │ ├── Music │ │ │ ├── np.js │ │ │ ├── pause.js │ │ │ ├── play.js │ │ │ ├── queue.js │ │ │ ├── remove.js │ │ │ ├── resume.js │ │ │ ├── skip.js │ │ │ ├── stop.js │ │ │ └── volume.js │ │ ├── Reaction-Roles │ │ │ ├── react-roles.js │ │ │ └── setup.js │ │ ├── Search │ │ │ ├── djs-docs.js │ │ │ ├── github.js │ │ │ ├── npm.js │ │ │ └── wiki.js │ │ └── Ticket │ │ │ ├── Command │ │ │ ├── close.js │ │ │ ├── create.js │ │ │ ├── lock.js │ │ │ ├── transcript.js │ │ │ └── unlock.js │ │ │ ├── Reaction │ │ │ ├── create-coding.js │ │ │ ├── create-common.js │ │ │ ├── create-giveaway.js │ │ │ └── setup.js │ │ │ ├── add.js │ │ │ ├── remove.js │ │ │ └── stat.js │ ├── Per-Server-Commands │ │ ├── Other │ │ │ ├── bot-join-leave-logs.js │ │ │ └── join-message.js │ │ ├── Reset │ │ │ ├── resetcahtbot.js │ │ │ └── resetprefix.js │ │ └── Set │ │ │ ├── setchatbot.js │ │ │ └── setprefix.js │ ├── command-base.js │ └── load-commands.js ├── config.json ├── index.js ├── package.json └── utils │ └── EditMessage.js └── Episode 50 ├── commands ├── Main-Commands │ ├── Economy │ │ ├── Shop │ │ │ ├── Buy │ │ │ │ ├── fish-rod.js │ │ │ │ └── laptop.js │ │ │ ├── Sell │ │ │ │ ├── fish-rod.js │ │ │ │ └── laptop.js │ │ │ └── shop.js │ │ ├── addmoney.js │ │ ├── balance.js │ │ ├── beg.js │ │ ├── daily.js │ │ ├── deposit.js │ │ ├── lb.js │ │ ├── monthly.js │ │ ├── removemoney.js │ │ ├── rob.js │ │ ├── weekly.js │ │ └── withdraw.js │ ├── Fun │ │ ├── buttons.js │ │ ├── chatbot.js │ │ ├── nickname-button.js │ │ ├── nickname.js │ │ ├── ping.js │ │ ├── suggest.js │ │ ├── youtube.js │ │ ├── ytstats-npm.js │ │ └── ytstats.js │ ├── GiveAways │ │ ├── delete.js │ │ ├── edit.js │ │ ├── end.js │ │ ├── re-roll.js │ │ └── start.js │ ├── Info │ │ ├── bot-info.js │ │ ├── server-info.js │ │ ├── uptime.js │ │ └── user-info.js │ ├── Mod │ │ ├── ban.js │ │ ├── create-role.js │ │ ├── embed.js │ │ ├── kick.js │ │ ├── member-count.js │ │ ├── mute.js │ │ ├── purge.js │ │ ├── tempban.js │ │ ├── tepmmute.js │ │ ├── unban.js │ │ ├── unmute.js │ │ ├── unwarn.js │ │ ├── warn.js │ │ ├── warnings.js │ │ └── welcome.js │ ├── Music │ │ ├── np.js │ │ ├── pause.js │ │ ├── play.js │ │ ├── queue.js │ │ ├── remove.js │ │ ├── resume.js │ │ ├── skip.js │ │ ├── stop.js │ │ └── volume.js │ ├── Rank │ │ ├── addlevel.js │ │ ├── addxp.js │ │ ├── rank.js │ │ ├── removelevel.js │ │ └── removexp.js │ ├── Reaction-Roles │ │ ├── react-roles.js │ │ └── setup.js │ ├── Search │ │ ├── appstore.js │ │ ├── djs-docs.js │ │ ├── github.js │ │ ├── npm.js │ │ ├── playstore.js │ │ ├── wiki.js │ │ └── yt-search.js │ └── Ticket │ │ ├── Command │ │ ├── close.js │ │ ├── create.js │ │ ├── lock.js │ │ ├── transcript.js │ │ └── unlock.js │ │ ├── Reaction │ │ ├── create-coding.js │ │ ├── create-common.js │ │ ├── create-giveaway.js │ │ └── setup.js │ │ ├── add.js │ │ ├── remove.js │ │ └── stat.js ├── Per-Server-Commands │ ├── Other │ │ ├── bot-join-leave-logs.js │ │ └── join-message.js │ ├── Reset │ │ ├── resetcahtbot.js │ │ ├── resetlevelupchan.js │ │ ├── resetprefix.js │ │ └── resetrankbg.js │ └── Set │ │ ├── setchatbot.js │ │ ├── setlevelupchan.js │ │ ├── setprefix.js │ │ └── setrankbg.js ├── command-base.js └── load-commands.js ├── config.json ├── index.js ├── package.json └── utils └── EditMessage.js /Episode 01/index.js: -------------------------------------------------------------------------------- 1 | const Discord = require('discord.js'); 2 | const client = new Discord.Client(); 3 | 4 | client.once('ready', () => { 5 | console.log('Ready.') 6 | }) 7 | 8 | client.on('message', message => { 9 | console.log(message.content); //If You Dont Want The Messages In Console Then Remove This Line, This Will Log Messages In Console 10 | 11 | if (message.content === 'ping') { 12 | message.channel.send('Pong!'); //message.reply('Pong!'); Also If You Want The BOT To Ping The Person Who Used The Command 13 | } 14 | if (message.content === 'youtube') { 15 | message.channel.send('https://youtube.com/techtipcyber'); //message.reply('https://youtube.com/techtipcyber'); Also If You Want The BOT To Ping The Person Who Used The Command 16 | } 17 | 18 | }); 19 | -------------------------------------------------------------------------------- /Episode 01/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tutorial-bot", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "TTC", 10 | "license": "ISC", 11 | "dependencies": { 12 | "discord.js": "^12.5.1" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Episode 02/commands/ping.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | name: 'ping', 3 | description: 'Smple Ping Command', //Optional 4 | execute(message, args){ 5 | message.channel.send('Pong!') 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Episode 02/commands/youtube.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | name: 'yt', 3 | description: 'Sends YT Link', //Optional 4 | execute(message, args) { 5 | message.channel.send('https://youtube.com/techtipcyber') 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Episode 02/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "token": "Your-Token", 3 | "prefix": "+" 4 | } 5 | -------------------------------------------------------------------------------- /Episode 02/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tutorial-bot", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "TTC", 10 | "license": "ISC", 11 | "dependencies": { 12 | "discord.js": "^12.5.1" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Episode 03/commands/ping.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | name: 'ping', 3 | description: 'Smple Ping Command', //Optional 4 | execute(message, args){ 5 | message.channel.send('Pong!') 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Episode 03/commands/purge.js: -------------------------------------------------------------------------------- 1 | module.exports ={ 2 | name: 'purge', 3 | description: 'Deletes Message', //Optional 4 | execute(message, args) { 5 | const amount = parseInt(args[0]) + 1; 6 | 7 | if (isNaN(amount)) { 8 | return message.channel.send('Please Enter A Number.') 9 | } else if (amount <= 1 || amount > 100) { 10 | return message.channel.send('You Can Only Delete Messages From 1 To 99.') 11 | } 12 | 13 | message.channel.bulkDelete(amount, true).catch(err => { 14 | console.error(err); 15 | message.channel.send('There Was An Error Deleting Messages In This Cahnnel.') 16 | }) 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Episode 03/commands/youtube.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | name: 'yt', 3 | description: 'Sends YT Link', //Optional 4 | execute(message, args) { 5 | message.channel.send('https://youtube.com/techtipcyber') 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Episode 03/config.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "token": "Your-Token", 4 | "prefix": "+" 5 | } 6 | -------------------------------------------------------------------------------- /Episode 03/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tutorial-bot", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "TTC", 10 | "license": "ISC", 11 | "dependencies": { 12 | "discord.js": "^12.5.1" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Episode 04/commands/ping.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | name: 'ping', 3 | description: 'Smple Ping Command', //Optional 4 | execute(message, args){ 5 | message.channel.send('Pong!') 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Episode 04/commands/purge.js: -------------------------------------------------------------------------------- 1 | module.exports ={ 2 | name: 'purge', 3 | description: 'Deletes Message', //Optional 4 | execute(message, args) { 5 | const amount = parseInt(args[0]) + 1; 6 | 7 | if (isNaN(amount)) { 8 | return message.channel.send('Please Enter A Number.') 9 | } else if (amount <= 1 || amount > 100) { 10 | return message.channel.send('You Can Only Delete Messages From 1 To 99.') 11 | } 12 | 13 | message.channel.bulkDelete(amount, true).catch(err => { 14 | console.error(err); 15 | message.channel.send('There Was An Error Deleting Messages In This Cahnnel.') 16 | }) 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Episode 04/commands/youtube.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | name: 'yt', 3 | description: 'Sends YT Link', //Optional 4 | execute(message, args) { 5 | message.channel.send('https://youtube.com/techtipcyber') 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Episode 04/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "token": "Your-Token", 3 | "prefix": "+" 4 | } 5 | -------------------------------------------------------------------------------- /Episode 04/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tutorial-bot", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "TTC", 10 | "license": "ISC", 11 | "dependencies": { 12 | "discord.js": "^12.5.1" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Episode 05/commands/load-commands.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | const fs = require('fs') 3 | 4 | module.exports = (client) => { 5 | const baseFile = 'command-base.js' 6 | const commandBase = require(`./${baseFile}`) 7 | 8 | const commands = [] 9 | 10 | const readCommands = (dir) => { 11 | const files = fs.readdirSync(path.join(__dirname, dir)) 12 | for (const file of files) { 13 | const stat = fs.lstatSync(path.join(__dirname, dir, file)) 14 | if (stat.isDirectory()) { 15 | readCommands(path.join(dir, file)) 16 | } else if (file !== baseFile && file !== 'load-commands.js') { 17 | const option = require(path.join(__dirname, dir, file)) 18 | commands.push(option) 19 | if (client) { 20 | commandBase(client, option) 21 | } 22 | } 23 | } 24 | } 25 | 26 | readCommands('.') // To Read All Commands of 'commands' Folder 27 | 28 | return commands 29 | } 30 | -------------------------------------------------------------------------------- /Episode 05/commands/ping.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['p', 'ping'], 3 | description: 'Smple Ping Command', //Optional 4 | callback: (message, args) => { 5 | message.channel.send('Pong!') 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Episode 05/commands/purge.js: -------------------------------------------------------------------------------- 1 | module.exports ={ 2 | commands: ['del', 'purge'], 3 | permissions: 'ADMINISTRATOR', 4 | permissionError: 'You Cant Use It', 5 | description: 'Deletes Message', //Optional 6 | callback: (message, args) => { 7 | const amount = parseInt(args[0]) + 1; 8 | 9 | if (isNaN(amount)) { 10 | return message.channel.send('Please Enter A Number.') 11 | } else if (amount <= 1 || amount > 100) { 12 | return message.channel.send('You Can Only Delete Messages From 1 To 99.') 13 | } 14 | 15 | message.channel.bulkDelete(amount, true).catch(err => { 16 | console.error(err); 17 | message.channel.send('There Was An Error Deleting Messages In This Cahnnel.') 18 | }) 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Episode 05/commands/youtube.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['youtube', 'yt'], 3 | description: 'Sends YT Channel Link', //Optional 4 | callback: (message, args) => { 5 | message.channel.send('https://youtube.com/techtipcyber') 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Episode 05/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "token": "Your-Token", 3 | "prefix": "+" 4 | } 5 | -------------------------------------------------------------------------------- /Episode 05/index.js: -------------------------------------------------------------------------------- 1 | const Discord = require('discord.js'); 2 | const client = new Discord.Client(); 3 | 4 | const { token } = require('./config.json') 5 | const welcome = require('./commands/welcome'); 6 | const loadCommands = require('./commands/load-commands'); // Add This 7 | 8 | 9 | client.once('ready', () => { 10 | console.log('Ready.') 11 | 12 | setInterval(() => { 13 | const statuses = [ 14 | `Tech Tip Cyber Videos`, 15 | `YouTube Tutorial`, 16 | ] 17 | 18 | const status = statuses[Math.floor(Math.random() * statuses.length)] 19 | client.user.setActivity(status, { type: "WATCHING"}) // Can Be WATCHING, STREAMING, LISTENING 20 | }, 2000) // Second You Want to Change Status, This Cahnges Every 2 Seconds 21 | 22 | welcome(client) 23 | loadCommands(client) // Add This 24 | }) 25 | 26 | client.login(token) 27 | -------------------------------------------------------------------------------- /Episode 05/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tutorial-bot", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "TTC", 10 | "license": "ISC", 11 | "dependencies": { 12 | "discord.js": "^12.5.1" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Episode 06/commands/Fun/ping.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['p', 'ping'], // You Can Keep Any Name 3 | description: 'Smple Ping Command', //Optional 4 | callback: (message, args) => { 5 | message.channel.send('Pong!') 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Episode 06/commands/Fun/youtube.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['youtube', 'yt'], // You Can Keep Any Name 3 | description: 'Sends YT Link', //Optional 4 | callback: (message, args) => { 5 | message.channel.send('https://youtube.com/techtipcyber') 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Episode 06/commands/Mod/purge.js: -------------------------------------------------------------------------------- 1 | module.exports ={ 2 | commands: ['del', 'purge'], 3 | permissions: 'ADMINISTRATOR', // You Can Keep Any Permission 4 | permissionError: 'You Cant Use It', 5 | description: 'Deletes Message', //Optional 6 | callback: (message, args) => { 7 | const amount = parseInt(args[0]) + 1; 8 | 9 | if (isNaN(amount)) { 10 | return message.channel.send('Please Enter A Number.') 11 | } else if (amount <= 1 || amount > 100) { 12 | return message.channel.send('You Can Only Delete Messages From 1 To 99.') 13 | } 14 | 15 | message.channel.bulkDelete(amount, true).catch(err => { 16 | console.error(err); 17 | message.channel.send('There Was An Error Deleting Messages In This Cahnnel.') 18 | }) 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Episode 06/commands/load-commands.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | const fs = require('fs') 3 | 4 | module.exports = (client) => { 5 | const baseFile = 'command-base.js' 6 | const commandBase = require(`./${baseFile}`) 7 | 8 | const commands = [] 9 | 10 | const readCommands = (dir) => { 11 | const files = fs.readdirSync(path.join(__dirname, dir)) 12 | for (const file of files) { 13 | const stat = fs.lstatSync(path.join(__dirname, dir, file)) 14 | if (stat.isDirectory()) { 15 | readCommands(path.join(dir, file)) 16 | } else if (file !== baseFile && file !== 'load-commands.js') { 17 | const option = require(path.join(__dirname, dir, file)) 18 | commands.push(option) 19 | if (client) { 20 | commandBase(client, option) 21 | } 22 | } 23 | } 24 | } 25 | 26 | readCommands('.') // To Read All Commands of 'commands' Folder 27 | 28 | return commands 29 | } 30 | -------------------------------------------------------------------------------- /Episode 06/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "token": "Your-Token", 3 | "prefix": "+" 4 | } 5 | -------------------------------------------------------------------------------- /Episode 06/index.js: -------------------------------------------------------------------------------- 1 | const Discord = require('discord.js'); 2 | const client = new Discord.Client(); 3 | 4 | const { token } = require('./config.json') 5 | const welcome = require('./commands/Mod/welcome'); 6 | const loadCommands = require('./commands/load-commands'); 7 | 8 | 9 | client.once('ready', () => { 10 | console.log('Ready.') 11 | 12 | setInterval(() => { 13 | const statuses = [ 14 | `Tech Tip Cyber Videos`, 15 | `YouTube Tutorial`, 16 | ] 17 | 18 | const status = statuses[Math.floor(Math.random() * statuses.length)] 19 | client.user.setActivity(status, { type: "WATCHING"}) // Can Be WATCHING, STREAMING, LISTENING 20 | }, 2000) // Second You Want to Change Status, This Cahnges Every 2 Seconds 21 | 22 | welcome(client) 23 | loadCommands(client) 24 | }) 25 | 26 | client.login(token) 27 | -------------------------------------------------------------------------------- /Episode 06/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tutorial-bot", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "TTC", 10 | "license": "ISC", 11 | "dependencies": { 12 | "discord.js": "^12.5.1", 13 | "ms": "^2.1.3" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Episode 07/commands/Fun/ping.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['p', 'ping'], // You Can Keep Any Name 3 | description: 'Smple Ping Command', //Optional 4 | callback: (message, args) => { 5 | message.channel.send('Pong!') 6 | } 7 | -------------------------------------------------------------------------------- /Episode 07/commands/Fun/youtube.js: -------------------------------------------------------------------------------- 1 | 2 | module.exports = { 3 | commands: ['youtube', 'yt'], // You Can Keep Any Name 4 | description: 'Sends YT Link', // Optional 5 | callback: (message, args) => { 6 | message.channel.send('https://youtube.com/techtipcyber') 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Episode 07/commands/Mod/ban.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | 3 | module.exports = { 4 | commands: 'ban', // You Can Keep Any Name 5 | description: 'Bans A User.', // Optional 6 | permissions: 'BAN_MEMBERS', // You Can Keep Any Permissions 7 | permissionError: 'You Dont Have Perms To Ban Someone', 8 | expectedArgs: '+ban @User', // Optional 9 | 10 | callback: (message, args) => { 11 | const member = message.mentions.members.first() 12 | if(!member) return message.reply('You Need To Mention A Member To Ban.') // Mention To Ban. 13 | member.ban() 14 | 15 | const embed = new MessageEmbed() 16 | .setTitle('User Banned') 17 | .setDescription(`<@${member.user.id}> Has Been Banned.`) 18 | .addField('Banned By', message.author) 19 | .setColor('RANDOM') 20 | message.channel.send(embed) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Episode 07/commands/Mod/kick.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | 3 | module.exports = { 4 | commands: 'kick', // You Can Keep Any Name 5 | description: 'Kicks A User.', // Optional 6 | permissions: 'KICK_MEMBERS', // You Can Keep Any Permissions 7 | permissionError: 'You Dont Have Perms To Kick Someone', 8 | expectedArgs: '+Kick @User', // Optional 9 | 10 | callback: (message, args) => { 11 | const member = message.mentions.members.first() 12 | if(!member) return message.reply('You Need To Mention A Member To Kick.') // Mention To Kick. 13 | member.kick() 14 | 15 | const embed = new MessageEmbed() 16 | .setTitle('User Kicked') 17 | .setDescription(`<@${member.user.id}> Has Been Kicked.`) 18 | .addField('Kicked By', message.author) 19 | .setColor('RANDOM') 20 | message.channel.send(embed) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Episode 07/commands/Mod/purge.js: -------------------------------------------------------------------------------- 1 | module.exports ={ 2 | commands: ['del', 'purge'], // You Can Keep Any Name 3 | permissions: 'ADMINISTRATOR', // You Can Keep Any Permission 4 | permissionError: 'You Cant Use It', 5 | description: 'Deletes Message', //Optional 6 | callback: (message, args) => { 7 | const amount = parseInt(args[0]) + 1; 8 | 9 | if (isNaN(amount)) { 10 | return message.channel.send('Please Enter A Number.') 11 | } else if (amount <= 1 || amount > 100) { 12 | return message.channel.send('You Can Only Delete Messages From 1 To 99.') 13 | } 14 | 15 | message.channel.bulkDelete(amount, true).catch(err => { 16 | console.error(err); 17 | message.channel.send('There Was An Error Deleting Messages In This Cahnnel.') 18 | }) 19 | } 20 | } -------------------------------------------------------------------------------- /Episode 07/commands/load-commads.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | const fs = require('fs') 3 | 4 | module.exports = (client) => { 5 | const baseFile = 'command-base.js' 6 | const commandBase = require(`./${baseFile}`) 7 | 8 | const commands = [] 9 | 10 | const readCommands = (dir) => { 11 | const files = fs.readdirSync(path.join(__dirname, dir)) 12 | for (const file of files) { 13 | const stat = fs.lstatSync(path.join(__dirname, dir, file)) 14 | if (stat.isDirectory()) { 15 | readCommands(path.join(dir, file)) 16 | } else if (file !== baseFile && file !== 'load-commands.js') { 17 | const option = require(path.join(__dirname, dir, file)) 18 | commands.push(option) 19 | if (client) { 20 | commandBase(client, option) 21 | } 22 | } 23 | } 24 | } 25 | 26 | readCommands('.') // To Read All Commands of 'commands' Folder 27 | 28 | return commands 29 | } 30 | -------------------------------------------------------------------------------- /Episode 07/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "token": "Your-Token", 3 | "prefix": "+" 4 | } 5 | -------------------------------------------------------------------------------- /Episode 07/index.js: -------------------------------------------------------------------------------- 1 | const Discord = require('discord.js'); 2 | const client = new Discord.Client(); 3 | 4 | const { token } = require('./config.json') 5 | const welcome = require('./commands/Mod/welcome'); 6 | const loadCommands = require('./commands/load-commands'); 7 | 8 | 9 | client.once('ready', () => { 10 | console.log('Ready.') 11 | 12 | setInterval(() => { 13 | const statuses = [ 14 | `Tech Tip Cyber Videos`, 15 | `YouTube Tutorial`, 16 | ] 17 | 18 | const status = statuses[Math.floor(Math.random() * statuses.length)] 19 | client.user.setActivity(status, { type: "WATCHING"}) // Can Be WATCHING, STREAMING, LISTENING 20 | }, 2000) // Second You Want to Change Status, This Cahnges Every 2 Seconds 21 | 22 | welcome(client) 23 | loadCommands(client) 24 | }) 25 | 26 | client.login(token) 27 | -------------------------------------------------------------------------------- /Episode 07/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tutorial-bot", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "TTC", 10 | "license": "ISC", 11 | "dependencies": { 12 | "discord.js": "^12.5.1", 13 | "ms": "^2.1.3" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Episode 08/commands/Fun/ping.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['p', 'ping'], // You Can Keep Any Name 3 | description: 'Smple Ping Command', //Optional 4 | callback: (message, args) => { 5 | message.channel.send('Pong!') 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Episode 08/commands/Fun/youtube.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['youtube', 'yt'], // You Can Keep Any Name 3 | description: 'Sends YT Link', // Optional 4 | callback: (message, args) => { 5 | message.channel.send('https://youtube.com/techtipcyber') 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Episode 08/commands/Mod/ban.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | 3 | module.exports = { 4 | commands: 'ban', // You Can Keep Any Name 5 | description: 'Bans A User.', // Optional 6 | permissions: 'BAN_MEMBERS', // You Can Keep Any Permissions 7 | permissionError: 'You Dont Have Perms To Ban Someone', 8 | expectedArgs: '+ban @User', // Optional 9 | 10 | callback: (message, args) => { 11 | const member = message.mentions.members.first() 12 | if(!member) return message.reply('You Need To Mention A Member To Ban.') // Mention To Ban. 13 | member.ban() 14 | 15 | const embed = new MessageEmbed() 16 | .setTitle('User Banned') 17 | .setDescription(`<@${member.user.id}> Has Been Banned.`) 18 | .addField('Banned By', message.author) 19 | .setColor('RANDOM') 20 | message.channel.send(embed) 21 | } 22 | } -------------------------------------------------------------------------------- /Episode 08/commands/Mod/kick.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | 3 | module.exports = { 4 | commands: 'kick', // You Can Keep Any Name 5 | description: 'Kicks A User.', // Optional 6 | permissions: 'KICK_MEMBERS', // You Can Keep Any Permissions 7 | permissionError: 'You Dont Have Perms To Kick Someone', 8 | expectedArgs: '+Kick @User', // Optional 9 | 10 | callback: (message, args) => { 11 | const member = message.mentions.members.first() 12 | if(!member) return message.reply('You Need To Mention A Member To Kick.') // Mention To Kick. 13 | member.kick() 14 | 15 | const embed = new MessageEmbed() 16 | .setTitle('User Kicked') 17 | .setDescription(`<@${member.user.id}> Has Been Kicked.`) 18 | .addField('Kicked By', message.author) 19 | .setColor('RANDOM') 20 | message.channel.send(embed) 21 | } 22 | } -------------------------------------------------------------------------------- /Episode 08/commands/Mod/purge.js: -------------------------------------------------------------------------------- 1 | module.exports ={ 2 | commands: ['del', 'purge'], // You Can Keep Any Name 3 | permissions: 'ADMINISTRATOR', // You Can Keep Any Permission 4 | permissionError: 'You Cant Use It', 5 | description: 'Deletes Message', //Optional 6 | callback: (message, args) => { 7 | const amount = parseInt(args[0]) + 1; 8 | 9 | if (isNaN(amount)) { 10 | return message.channel.send('Please Enter A Number.') 11 | } else if (amount <= 1 || amount > 100) { 12 | return message.channel.send('You Can Only Delete Messages From 1 To 99.') 13 | } 14 | 15 | message.channel.bulkDelete(amount, true).catch(err => { 16 | console.error(err); 17 | message.channel.send('There Was An Error Deleting Messages In This Cahnnel.') 18 | }) 19 | } 20 | } -------------------------------------------------------------------------------- /Episode 08/commands/load-commands.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | const fs = require('fs') 3 | 4 | module.exports = (client) => { 5 | const baseFile = 'command-base.js' 6 | const commandBase = require(`./${baseFile}`) 7 | 8 | const commands = [] 9 | 10 | const readCommands = (dir) => { 11 | const files = fs.readdirSync(path.join(__dirname, dir)) 12 | for (const file of files) { 13 | const stat = fs.lstatSync(path.join(__dirname, dir, file)) 14 | if (stat.isDirectory()) { 15 | readCommands(path.join(dir, file)) 16 | } else if (file !== baseFile && file !== 'load-commands.js') { 17 | const option = require(path.join(__dirname, dir, file)) 18 | commands.push(option) 19 | if (client) { 20 | commandBase(client, option) 21 | } 22 | } 23 | } 24 | } 25 | 26 | readCommands('.') // To Read All Commands of 'commands' Folder 27 | 28 | return commands 29 | } 30 | -------------------------------------------------------------------------------- /Episode 08/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "token": "Your-Token", 3 | "prefix": "+" 4 | } 5 | -------------------------------------------------------------------------------- /Episode 08/index.js: -------------------------------------------------------------------------------- 1 | const Discord = require('discord.js'); 2 | const client = new Discord.Client(); 3 | 4 | const { token } = require('./config.json') 5 | const welcome = require('./commands/Mod/welcome'); 6 | const loadCommands = require('./commands/load-commands'); 7 | 8 | 9 | client.once('ready', () => { 10 | console.log('Ready.') 11 | 12 | setInterval(() => { 13 | const statuses = [ 14 | `Tech Tip Cyber Videos`, 15 | `YouTube Tutorial`, 16 | ] 17 | 18 | const status = statuses[Math.floor(Math.random() * statuses.length)] 19 | client.user.setActivity(status, { type: "WATCHING"}) // Can Be WATCHING, STREAMING, LISTENING 20 | }, 2000) // Second You Want to Change Status, This Cahnges Every 2 Seconds 21 | 22 | welcome(client) 23 | loadCommands(client) 24 | }) 25 | 26 | client.login(token) 27 | -------------------------------------------------------------------------------- /Episode 08/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tutorial-bot", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "TTC", 10 | "license": "ISC", 11 | "dependencies": { 12 | "discord.js": "^12.5.1", 13 | "ms": "^2.1.3" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Episode 09/commands/Fun/ping.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['p', 'ping'], // You Can Keep Any Name 3 | description: 'Smple Ping Command', //Optional 4 | callback: (message, args) => { 5 | message.channel.send('Pong!') 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Episode 09/commands/Fun/youtube.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['youtube', 'yt'], // You Can Keep Any Name 3 | description: 'Sends YT Link', // Optional 4 | callback: (message, args) => { 5 | message.channel.send('https://youtube.com/techtipcyber') 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Episode 09/commands/Mod/ban.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | 3 | module.exports = { 4 | commands: 'ban', // You Can Keep Any Name 5 | description: 'Bans A User.', // Optional 6 | permissions: 'BAN_MEMBERS', // You Can Keep Any Permissions 7 | permissionError: 'You Dont Have Perms To Ban Someone', 8 | expectedArgs: '+ban @User', // Optional 9 | 10 | callback: (message, args) => { 11 | const member = message.mentions.members.first() 12 | if(!member) return message.reply('You Need To Mention A Member To Ban.') // Mention To Ban. 13 | member.ban() 14 | 15 | const embed = new MessageEmbed() 16 | .setTitle('User Banned') 17 | .setDescription(`<@${member.user.id}> Has Been Banned.`) 18 | .addField('Banned By', message.author) 19 | .setColor('RANDOM') 20 | message.channel.send(embed) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Episode 09/commands/Mod/kick.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | 3 | module.exports = { 4 | commands: 'kick', // You Can Keep Any Name 5 | description: 'Kicks A User.', // Optional 6 | permissions: 'KICK_MEMBERS', // You Can Keep Any Permissions 7 | permissionError: 'You Dont Have Perms To Kick Someone', 8 | expectedArgs: '+Kick @User', // Optional 9 | 10 | callback: (message, args) => { 11 | const member = message.mentions.members.first() 12 | if(!member) return message.reply('You Need To Mention A Member To Kick.') // Mention To Kick. 13 | member.kick() 14 | 15 | const embed = new MessageEmbed() 16 | .setTitle('User Kicked') 17 | .setDescription(`<@${member.user.id}> Has Been Kicked.`) 18 | .addField('Kicked By', message.author) 19 | .setColor('RANDOM') 20 | message.channel.send(embed) 21 | } 22 | } -------------------------------------------------------------------------------- /Episode 09/commands/Mod/purge.js: -------------------------------------------------------------------------------- 1 | module.exports ={ 2 | commands: ['del', 'purge'], // You Can Keep Any Name 3 | permissions: 'ADMINISTRATOR', // You Can Keep Any Permission 4 | permissionError: 'You Cant Use It', 5 | description: 'Deletes Message', //Optional 6 | callback: (message, args) => { 7 | const amount = parseInt(args[0]) + 1; 8 | 9 | if (isNaN(amount)) { 10 | return message.channel.send('Please Enter A Number.') 11 | } else if (amount <= 1 || amount > 100) { 12 | return message.channel.send('You Can Only Delete Messages From 1 To 99.') 13 | } 14 | 15 | message.channel.bulkDelete(amount, true).catch(err => { 16 | console.error(err); 17 | message.channel.send('There Was An Error Deleting Messages In This Cahnnel.') 18 | }) 19 | } 20 | } -------------------------------------------------------------------------------- /Episode 09/commands/load-commands.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | const fs = require('fs') 3 | 4 | module.exports = (client) => { 5 | const baseFile = 'command-base.js' 6 | const commandBase = require(`./${baseFile}`) 7 | 8 | const commands = [] 9 | 10 | const readCommands = (dir) => { 11 | const files = fs.readdirSync(path.join(__dirname, dir)) 12 | for (const file of files) { 13 | const stat = fs.lstatSync(path.join(__dirname, dir, file)) 14 | if (stat.isDirectory()) { 15 | readCommands(path.join(dir, file)) 16 | } else if (file !== baseFile && file !== 'load-commands.js') { 17 | const option = require(path.join(__dirname, dir, file)) 18 | commands.push(option) 19 | if (client) { 20 | commandBase(client, option) 21 | } 22 | } 23 | } 24 | } 25 | 26 | readCommands('.') // To Read All Commands of 'commands' Folder 27 | 28 | return commands 29 | } 30 | -------------------------------------------------------------------------------- /Episode 09/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "token": "Your-Token", 3 | "prefix": "+" 4 | } 5 | -------------------------------------------------------------------------------- /Episode 09/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tutorial-bot", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "TTC", 10 | "license": "ISC", 11 | "dependencies": { 12 | "@discordjs/opus": "^0.3.3", 13 | "@distube/ytpl": "^1.0.10", 14 | "discord.js": "^12.5.1", 15 | "ffmpeg": "0.0.4", 16 | "ffmpeg-static": "^4.2.7", 17 | "ms": "^2.1.3", 18 | "node-opus": "^0.3.3", 19 | "opusscript": "0.0.7", 20 | "youtube-sr": "^2.0.5", 21 | "ytdl-core": "^4.0.5" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Episode 10/commands/Fun/ping.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['p', 'ping'], // You Can Keep Any Name 3 | description: 'Smple Ping Command', //Optional 4 | callback: (message, args) => { 5 | message.channel.send('Pong!') 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Episode 10/commands/Fun/youtube.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['youtube', 'yt'], // You Can Keep Any Name 3 | description: 'Sends YT Link', // Optional 4 | callback: (message, args) => { 5 | message.channel.send('https://youtube.com/techtipcyber') 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Episode 10/commands/Mod/ban.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | 3 | module.exports = { 4 | commands: 'ban', // You Can Keep Any Name 5 | description: 'Bans A User.', // Optional 6 | permissions: 'BAN_MEMBERS', // You Can Keep Any Permissions 7 | permissionError: 'You Dont Have Perms To Ban Someone', 8 | expectedArgs: '+ban @User', // Optional 9 | 10 | callback: (message, args) => { 11 | const member = message.mentions.members.first() 12 | if(!member) return message.reply('You Need To Mention A Member To Ban.') // Mention To Ban. 13 | member.ban() 14 | 15 | const embed = new MessageEmbed() 16 | .setTitle('User Banned') 17 | .setDescription(`<@${member.user.id}> Has Been Banned.`) 18 | .addField('Banned By', message.author) 19 | .setColor('RANDOM') 20 | message.channel.send(embed) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Episode 10/commands/Mod/kick.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | 3 | module.exports = { 4 | commands: 'kick', // You Can Keep Any Name 5 | description: 'Kicks A User.', // Optional 6 | permissions: 'KICK_MEMBERS', // You Can Keep Any Permissions 7 | permissionError: 'You Dont Have Perms To Kick Someone', 8 | expectedArgs: '+Kick @User', // Optional 9 | 10 | callback: (message, args) => { 11 | const member = message.mentions.members.first() 12 | if(!member) return message.reply('You Need To Mention A Member To Kick.') // Mention To Kick. 13 | member.kick() 14 | 15 | const embed = new MessageEmbed() 16 | .setTitle('User Kicked') 17 | .setDescription(`<@${member.user.id}> Has Been Kicked.`) 18 | .addField('Kicked By', message.author) 19 | .setColor('RANDOM') 20 | message.channel.send(embed) 21 | } 22 | } -------------------------------------------------------------------------------- /Episode 10/commands/Mod/purge.js: -------------------------------------------------------------------------------- 1 | module.exports ={ 2 | commands: ['del', 'purge'], // You Can Keep Any Name 3 | permissions: 'ADMINISTRATOR', // You Can Keep Any Permission 4 | permissionError: 'You Cant Use It', 5 | description: 'Deletes Message', //Optional 6 | callback: (message, args) => { 7 | const amount = parseInt(args[0]) + 1; 8 | 9 | if (isNaN(amount)) { 10 | return message.channel.send('Please Enter A Number.') 11 | } else if (amount <= 1 || amount > 100) { 12 | return message.channel.send('You Can Only Delete Messages From 1 To 99.') 13 | } 14 | 15 | message.channel.bulkDelete(amount, true).catch(err => { 16 | console.error(err); 17 | message.channel.send('There Was An Error Deleting Messages In This Cahnnel.') 18 | }) 19 | } 20 | } -------------------------------------------------------------------------------- /Episode 10/commands/Music/queue.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed, guild } = require("discord.js") 2 | 3 | module.exports = { 4 | commands: ['queue', 'q'], // You Can Keep Any Name 5 | description: 'Shows Queue Of Music.', // Optional 6 | 7 | callback: (message, args) => { 8 | 9 | const serverQueue = message.client.queue.get(message.guild.id) // To Check If Music Is Being Played. 10 | if(!serverQueue) return message.reply('There Is No Music Being Played, Cant Show Queue.') // If No Music Is Being Played or BOT Isn't In VC. 11 | 12 | const q = serverQueue.songs 13 | 14 | const embed = new MessageEmbed() 15 | .setTitle('Queue') 16 | .setTimestamp() 17 | .setColor('RANDOM') 18 | .setFooter('Song Queue') 19 | for (var key in q) { embed.addFields({ name: '\u200b' + `${parseInt(key) + 1}` + ') ' +q[key].title, 20 | value: '' }) } 21 | message.channel.send(embed) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Episode 10/commands/load-commands.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | const fs = require('fs') 3 | 4 | module.exports = (client) => { 5 | const baseFile = 'command-base.js' 6 | const commandBase = require(`./${baseFile}`) 7 | 8 | const commands = [] 9 | 10 | const readCommands = (dir) => { 11 | const files = fs.readdirSync(path.join(__dirname, dir)) 12 | for (const file of files) { 13 | const stat = fs.lstatSync(path.join(__dirname, dir, file)) 14 | if (stat.isDirectory()) { 15 | readCommands(path.join(dir, file)) 16 | } else if (file !== baseFile && file !== 'load-commands.js') { 17 | const option = require(path.join(__dirname, dir, file)) 18 | commands.push(option) 19 | if (client) { 20 | commandBase(client, option) 21 | } 22 | } 23 | } 24 | } 25 | 26 | readCommands('.') // To Read All Commands of 'commands' Folder 27 | 28 | return commands 29 | } 30 | -------------------------------------------------------------------------------- /Episode 10/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "token": "Your-Token", 3 | "prefix": "+" 4 | } 5 | -------------------------------------------------------------------------------- /Episode 10/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tutorial-bot", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "TTC", 10 | "license": "ISC", 11 | "dependencies": { 12 | "@discordjs/opus": "^0.3.3", 13 | "@distube/ytpl": "^1.0.10", 14 | "discord.js": "^12.5.1", 15 | "ffmpeg": "0.0.4", 16 | "ffmpeg-static": "^4.2.7", 17 | "ms": "^2.1.3", 18 | "node-opus": "^0.3.3", 19 | "opusscript": "0.0.7", 20 | "youtube-sr": "^2.0.5", 21 | "ytdl-core": "^4.0.5" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Episode 11/commands/Fun/ping.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['p', 'ping'], // You Can Keep Any Name 3 | description: 'Smple Ping Command', //Optional 4 | callback: (message, args) => { 5 | message.channel.send('Pong!') 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Episode 11/commands/Fun/youtube.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['youtube', 'yt'], // You Can Keep Any Name 3 | description: 'Sends YT Link', // Optional 4 | callback: (message, args) => { 5 | message.channel.send('https://youtube.com/techtipcyber') 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Episode 11/commands/Mod/ban.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | 3 | module.exports = { 4 | commands: 'ban', // You Can Keep Any Name 5 | description: 'Bans A User.', // Optional 6 | permissions: 'BAN_MEMBERS', // You Can Keep Any Permissions 7 | permissionError: 'You Dont Have Perms To Ban Someone', 8 | expectedArgs: '+ban @User', // Optional 9 | 10 | callback: (message, args) => { 11 | const member = message.mentions.members.first() 12 | if(!member) return message.reply('You Need To Mention A Member To Ban.') // Mention To Ban. 13 | member.ban() 14 | 15 | const embed = new MessageEmbed() 16 | .setTitle('User Banned') 17 | .setDescription(`<@${member.user.id}> Has Been Banned.`) 18 | .addField('Banned By', message.author) 19 | .setColor('RANDOM') 20 | message.channel.send(embed) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Episode 11/commands/Mod/kick.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | 3 | module.exports = { 4 | commands: 'kick', // You Can Keep Any Name 5 | description: 'Kicks A User.', // Optional 6 | permissions: 'KICK_MEMBERS', // You Can Keep Any Permissions 7 | permissionError: 'You Dont Have Perms To Kick Someone', 8 | expectedArgs: '+Kick @User', // Optional 9 | 10 | callback: (message, args) => { 11 | const member = message.mentions.members.first() 12 | if(!member) return message.reply('You Need To Mention A Member To Kick.') // Mention To Kick. 13 | member.kick() 14 | 15 | const embed = new MessageEmbed() 16 | .setTitle('User Kicked') 17 | .setDescription(`<@${member.user.id}> Has Been Kicked.`) 18 | .addField('Kicked By', message.author) 19 | .setColor('RANDOM') 20 | message.channel.send(embed) 21 | } 22 | } -------------------------------------------------------------------------------- /Episode 11/commands/Mod/purge.js: -------------------------------------------------------------------------------- 1 | module.exports ={ 2 | commands: ['del', 'purge'], // You Can Keep Any Name 3 | permissions: 'ADMINISTRATOR', // You Can Keep Any Permission 4 | permissionError: 'You Cant Use It', 5 | description: 'Deletes Message', //Optional 6 | callback: (message, args) => { 7 | const amount = parseInt(args[0]) + 1; 8 | 9 | if (isNaN(amount)) { 10 | return message.channel.send('Please Enter A Number.') 11 | } else if (amount <= 1 || amount > 100) { 12 | return message.channel.send('You Can Only Delete Messages From 1 To 99.') 13 | } 14 | 15 | message.channel.bulkDelete(amount, true).catch(err => { 16 | console.error(err); 17 | message.channel.send('There Was An Error Deleting Messages In This Cahnnel.') 18 | }) 19 | } 20 | } -------------------------------------------------------------------------------- /Episode 11/commands/Music/queue.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed, guild } = require("discord.js") 2 | 3 | module.exports = { 4 | commands: ['queue', 'q'], // You Can Keep Any Name 5 | description: 'Shows Queue Of Music.', // Optional 6 | 7 | callback: (message, args) => { 8 | 9 | const serverQueue = message.client.queue.get(message.guild.id) // To Check If Music Is Being Played. 10 | if(!serverQueue) return message.reply('There Is No Music Being Played, Cant Show Queue.') // If No Music Is Being Played or BOT Isn't In VC. 11 | 12 | const q = serverQueue.songs 13 | 14 | const embed = new MessageEmbed() 15 | .setTitle('Queue') 16 | .setTimestamp() 17 | .setColor('RANDOM') 18 | .setFooter('Song Queue') 19 | for (var key in q) { embed.addFields({ name: '\u200b' + `${parseInt(key) + 1}` + ') ' +q[key].title, 20 | value: '' }) } 21 | message.channel.send(embed) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Episode 11/commands/load-commands.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | const fs = require('fs') 3 | 4 | module.exports = (client) => { 5 | const baseFile = 'command-base.js' 6 | const commandBase = require(`./${baseFile}`) 7 | 8 | const commands = [] 9 | 10 | const readCommands = (dir) => { 11 | const files = fs.readdirSync(path.join(__dirname, dir)) 12 | for (const file of files) { 13 | const stat = fs.lstatSync(path.join(__dirname, dir, file)) 14 | if (stat.isDirectory()) { 15 | readCommands(path.join(dir, file)) 16 | } else if (file !== baseFile && file !== 'load-commands.js') { 17 | const option = require(path.join(__dirname, dir, file)) 18 | commands.push(option) 19 | if (client) { 20 | commandBase(client, option) 21 | } 22 | } 23 | } 24 | } 25 | 26 | readCommands('.') // To Read All Commands of 'commands' Folder 27 | 28 | return commands 29 | } 30 | -------------------------------------------------------------------------------- /Episode 11/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "token": "Your-Token", 3 | "prefix": "+" 4 | } 5 | -------------------------------------------------------------------------------- /Episode 11/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tutorial-bot", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "TTC", 10 | "license": "ISC", 11 | "dependencies": { 12 | "@discordjs/opus": "^0.3.3", 13 | "@distube/ytpl": "^1.0.10", 14 | "discord.js": "^12.5.1", 15 | "ffmpeg": "0.0.4", 16 | "ffmpeg-static": "^4.2.7", 17 | "ms": "^2.1.3", 18 | "node-opus": "^0.3.3", 19 | "opusscript": "0.0.7", 20 | "youtube-sr": "^2.0.5", 21 | "ytdl-core": "^4.0.5" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Episode 12/commands/Fun/ping.js: -------------------------------------------------------------------------------- 1 | 2 | module.exports = { 3 | commands: ['p', 'ping'], // You Can Keep Any Name 4 | description: 'Smple Ping Command', //Optional 5 | callback: (message, args) => { 6 | message.channel.send('Pong!') 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Episode 12/commands/Fun/youtube.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['youtube', 'yt'], // You Can Keep Any Name 3 | description: 'Sends YT Link', // Optional 4 | callback: (message, args) => { 5 | message.channel.send('https://youtube.com/techtipcyber') 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Episode 12/commands/Mod/ban.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | 3 | module.exports = { 4 | commands: 'ban', // You Can Keep Any Name 5 | description: 'Bans A User.', // Optional 6 | permissions: 'BAN_MEMBERS', // You Can Keep Any Permissions 7 | permissionError: 'You Dont Have Perms To Ban Someone', 8 | expectedArgs: '+ban @User', // Optional 9 | 10 | callback: (message, args) => { 11 | const member = message.mentions.members.first() 12 | if(!member) return message.reply('You Need To Mention A Member To Ban.') // Mention To Ban. 13 | member.ban() 14 | 15 | const embed = new MessageEmbed() 16 | .setTitle('User Banned') 17 | .setDescription(`<@${member.user.id}> Has Been Banned.`) 18 | .addField('Banned By', message.author) 19 | .setColor('RANDOM') 20 | message.channel.send(embed) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Episode 12/commands/Mod/kick.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | 3 | module.exports = { 4 | commands: 'kick', // You Can Keep Any Name 5 | description: 'Kicks A User.', // Optional 6 | permissions: 'KICK_MEMBERS', // You Can Keep Any Permissions 7 | permissionError: 'You Dont Have Perms To Kick Someone', 8 | expectedArgs: '+Kick @User', // Optional 9 | 10 | callback: (message, args) => { 11 | const member = message.mentions.members.first() 12 | if(!member) return message.reply('You Need To Mention A Member To Kick.') // Mention To Kick. 13 | member.kick() 14 | 15 | const embed = new MessageEmbed() 16 | .setTitle('User Kicked') 17 | .setDescription(`<@${member.user.id}> Has Been Kicked.`) 18 | .addField('Kicked By', message.author) 19 | .setColor('RANDOM') 20 | message.channel.send(embed) 21 | } 22 | } -------------------------------------------------------------------------------- /Episode 12/commands/Mod/purge.js: -------------------------------------------------------------------------------- 1 | module.exports ={ 2 | commands: ['del', 'purge'], // You Can Keep Any Name 3 | permissions: 'ADMINISTRATOR', // You Can Keep Any Permission 4 | permissionError: 'You Cant Use It', 5 | description: 'Deletes Message', //Optional 6 | callback: (message, args) => { 7 | const amount = parseInt(args[0]) + 1; 8 | 9 | if (isNaN(amount)) { 10 | return message.channel.send('Please Enter A Number.') 11 | } else if (amount <= 1 || amount > 100) { 12 | return message.channel.send('You Can Only Delete Messages From 1 To 99.') 13 | } 14 | 15 | message.channel.bulkDelete(amount, true).catch(err => { 16 | console.error(err); 17 | message.channel.send('There Was An Error Deleting Messages In This Cahnnel.') 18 | }) 19 | } 20 | } -------------------------------------------------------------------------------- /Episode 12/commands/Music/queue.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed, guild } = require("discord.js") 2 | 3 | module.exports = { 4 | commands: ['queue', 'q'], // You Can Keep Any Name 5 | description: 'Shows Queue Of Music.', // Optional 6 | 7 | callback: (message, args) => { 8 | 9 | const serverQueue = message.client.queue.get(message.guild.id) // To Check If Music Is Being Played. 10 | if(!serverQueue) return message.reply('There Is No Music Being Played, Cant Show Queue.') // If No Music Is Being Played or BOT Isn't In VC. 11 | 12 | const q = serverQueue.songs 13 | 14 | const embed = new MessageEmbed() 15 | .setTitle('Queue') 16 | .setTimestamp() 17 | .setColor('RANDOM') 18 | .setFooter('Song Queue') 19 | for (var key in q) { embed.addFields({ name: '\u200b' + `${parseInt(key) + 1}` + ') ' +q[key].title, 20 | value: '' }) } 21 | message.channel.send(embed) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Episode 12/commands/load-commands.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | const fs = require('fs') 3 | 4 | module.exports = (client) => { 5 | const baseFile = 'command-base.js' 6 | const commandBase = require(`./${baseFile}`) 7 | 8 | const commands = [] 9 | 10 | const readCommands = (dir) => { 11 | const files = fs.readdirSync(path.join(__dirname, dir)) 12 | for (const file of files) { 13 | const stat = fs.lstatSync(path.join(__dirname, dir, file)) 14 | if (stat.isDirectory()) { 15 | readCommands(path.join(dir, file)) 16 | } else if (file !== baseFile && file !== 'load-commands.js') { 17 | const option = require(path.join(__dirname, dir, file)) 18 | commands.push(option) 19 | if (client) { 20 | commandBase(client, option) 21 | } 22 | } 23 | } 24 | } 25 | 26 | readCommands('.') // To Read All Commands of 'commands' Folder 27 | 28 | return commands 29 | } 30 | -------------------------------------------------------------------------------- /Episode 12/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "token": "Your-Token", 3 | "prefix": "+" 4 | } 5 | -------------------------------------------------------------------------------- /Episode 12/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tutorial-bot", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "TTC", 10 | "license": "ISC", 11 | "dependencies": { 12 | "@discordjs/opus": "^0.3.3", 13 | "@distube/ytpl": "^1.0.10", 14 | "discord.js": "^12.5.1", 15 | "ffmpeg": "0.0.4", 16 | "ffmpeg-static": "^4.2.7", 17 | "ms": "^2.1.3", 18 | "node-opus": "^0.3.3", 19 | "opusscript": "0.0.7", 20 | "youtube-sr": "^2.0.5", 21 | "ytdl-core": "^4.0.5" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Episode 13/commands/Fun/ping.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['p', 'ping'], // You Can Keep Any Name 3 | description: 'Smple Ping Command', //Optional 4 | callback: (message, args) => { 5 | message.channel.send('Pong!') 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Episode 13/commands/Fun/youtube.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['youtube', 'yt'], // You Can Keep Any Name 3 | description: 'Sends YT Link', // Optional 4 | callback: (message, args) => { 5 | message.channel.send('https://youtube.com/techtipcyber') 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Episode 13/commands/Mod/ban.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | 3 | module.exports = { 4 | commands: 'ban', // You Can Keep Any Name 5 | description: 'Bans A User.', // Optional 6 | permissions: 'BAN_MEMBERS', // You Can Keep Any Permissions 7 | permissionError: 'You Dont Have Perms To Ban Someone', 8 | expectedArgs: '+ban @User', // Optional 9 | 10 | callback: (message, args) => { 11 | const member = message.mentions.members.first() 12 | if(!member) return message.reply('You Need To Mention A Member To Ban.') // Mention To Ban. 13 | member.ban() 14 | 15 | const embed = new MessageEmbed() 16 | .setTitle('User Banned') 17 | .setDescription(`<@${member.user.id}> Has Been Banned.`) 18 | .addField('Banned By', message.author) 19 | .setColor('RANDOM') 20 | message.channel.send(embed) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Episode 13/commands/Mod/kick.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | 3 | module.exports = { 4 | commands: 'kick', // You Can Keep Any Name 5 | description: 'Kicks A User.', // Optional 6 | permissions: 'KICK_MEMBERS', // You Can Keep Any Permissions 7 | permissionError: 'You Dont Have Perms To Kick Someone', 8 | expectedArgs: '+Kick @User', // Optional 9 | 10 | callback: (message, args) => { 11 | const member = message.mentions.members.first() 12 | if(!member) return message.reply('You Need To Mention A Member To Kick.') // Mention To Kick. 13 | member.kick() 14 | 15 | const embed = new MessageEmbed() 16 | .setTitle('User Kicked') 17 | .setDescription(`<@${member.user.id}> Has Been Kicked.`) 18 | .addField('Kicked By', message.author) 19 | .setColor('RANDOM') 20 | message.channel.send(embed) 21 | } 22 | } -------------------------------------------------------------------------------- /Episode 13/commands/Mod/purge.js: -------------------------------------------------------------------------------- 1 | module.exports ={ 2 | commands: ['del', 'purge'], // You Can Keep Any Name 3 | permissions: 'ADMINISTRATOR', // You Can Keep Any Permission 4 | permissionError: 'You Cant Use It', 5 | description: 'Deletes Message', //Optional 6 | callback: (message, args) => { 7 | const amount = parseInt(args[0]) + 1; 8 | 9 | if (isNaN(amount)) { 10 | return message.channel.send('Please Enter A Number.') 11 | } else if (amount <= 1 || amount > 100) { 12 | return message.channel.send('You Can Only Delete Messages From 1 To 99.') 13 | } 14 | 15 | message.channel.bulkDelete(amount, true).catch(err => { 16 | console.error(err); 17 | message.channel.send('There Was An Error Deleting Messages In This Cahnnel.') 18 | }) 19 | } 20 | } -------------------------------------------------------------------------------- /Episode 13/commands/Music/queue.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed, guild } = require("discord.js") 2 | 3 | module.exports = { 4 | commands: ['queue', 'q'], // You Can Keep Any Name 5 | description: 'Shows Queue Of Music.', // Optional 6 | 7 | callback: (message, args) => { 8 | 9 | const serverQueue = message.client.queue.get(message.guild.id) // To Check If Music Is Being Played. 10 | if(!serverQueue) return message.reply('There Is No Music Being Played, Cant Show Queue.') // If No Music Is Being Played or BOT Isn't In VC. 11 | 12 | const q = serverQueue.songs 13 | 14 | const embed = new MessageEmbed() 15 | .setTitle('Queue') 16 | .setTimestamp() 17 | .setColor('RANDOM') 18 | .setFooter('Song Queue') 19 | for (var key in q) { embed.addFields({ name: '\u200b' + `${parseInt(key) + 1}` + ') ' +q[key].title, 20 | value: '' }) } 21 | message.channel.send(embed) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Episode 13/commands/load-commands.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | const fs = require('fs') 3 | 4 | module.exports = (client) => { 5 | const baseFile = 'command-base.js' 6 | const commandBase = require(`./${baseFile}`) 7 | 8 | const commands = [] 9 | 10 | const readCommands = (dir) => { 11 | const files = fs.readdirSync(path.join(__dirname, dir)) 12 | for (const file of files) { 13 | const stat = fs.lstatSync(path.join(__dirname, dir, file)) 14 | if (stat.isDirectory()) { 15 | readCommands(path.join(dir, file)) 16 | } else if (file !== baseFile && file !== 'load-commands.js') { 17 | const option = require(path.join(__dirname, dir, file)) 18 | commands.push(option) 19 | if (client) { 20 | commandBase(client, option) 21 | } 22 | } 23 | } 24 | } 25 | 26 | readCommands('.') // To Read All Commands of 'commands' Folder 27 | 28 | return commands 29 | } 30 | -------------------------------------------------------------------------------- /Episode 13/config.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "token": "Your-Token", 4 | "prefix": "+" 5 | } 6 | -------------------------------------------------------------------------------- /Episode 13/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tutorial-bot", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "TTC", 10 | "license": "ISC", 11 | "dependencies": { 12 | "@discordjs/opus": "^0.3.3", 13 | "@distube/ytpl": "^1.0.10", 14 | "discord.js": "^12.5.1", 15 | "ffmpeg": "0.0.4", 16 | "ffmpeg-static": "^4.2.7", 17 | "ms": "^2.1.3", 18 | "node-opus": "^0.3.3", 19 | "opusscript": "0.0.7", 20 | "youtube-sr": "^2.0.5", 21 | "ytdl-core": "^4.0.5" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Episode 14/commands/Fun/ping.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['p', 'ping'], // You Can Keep Any Name 3 | description: 'Smple Ping Command', //Optional 4 | callback: (message, args) => { 5 | message.channel.send('Pong!') 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Episode 14/commands/Fun/youtube.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['youtube', 'yt'], // You Can Keep Any Name 3 | description: 'Sends YT Link', // Optional 4 | callback: (message, args) => { 5 | message.channel.send('https://youtube.com/techtipcyber') 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Episode 14/commands/Mod/ban.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | 3 | module.exports = { 4 | commands: 'ban', // You Can Keep Any Name 5 | description: 'Bans A User.', // Optional 6 | permissions: 'BAN_MEMBERS', // You Can Keep Any Permissions 7 | permissionError: 'You Dont Have Perms To Ban Someone', 8 | expectedArgs: '+ban @User', // Optional 9 | 10 | callback: (message, args) => { 11 | const member = message.mentions.members.first() 12 | if(!member) return message.reply('You Need To Mention A Member To Ban.') // Mention To Ban. 13 | member.ban() 14 | 15 | const embed = new MessageEmbed() 16 | .setTitle('User Banned') 17 | .setDescription(`<@${member.user.id}> Has Been Banned.`) 18 | .addField('Banned By', message.author) 19 | .setColor('RANDOM') 20 | message.channel.send(embed) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Episode 14/commands/Mod/kick.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | 3 | module.exports = { 4 | commands: 'kick', // You Can Keep Any Name 5 | description: 'Kicks A User.', // Optional 6 | permissions: 'KICK_MEMBERS', // You Can Keep Any Permissions 7 | permissionError: 'You Dont Have Perms To Kick Someone', 8 | expectedArgs: '+Kick @User', // Optional 9 | 10 | callback: (message, args) => { 11 | const member = message.mentions.members.first() 12 | if(!member) return message.reply('You Need To Mention A Member To Kick.') // Mention To Kick. 13 | member.kick() 14 | 15 | const embed = new MessageEmbed() 16 | .setTitle('User Kicked') 17 | .setDescription(`<@${member.user.id}> Has Been Kicked.`) 18 | .addField('Kicked By', message.author) 19 | .setColor('RANDOM') 20 | message.channel.send(embed) 21 | } 22 | } -------------------------------------------------------------------------------- /Episode 14/commands/Mod/purge.js: -------------------------------------------------------------------------------- 1 | module.exports ={ 2 | commands: ['del', 'purge'], // You Can Keep Any Name 3 | permissions: 'ADMINISTRATOR', // You Can Keep Any Permission 4 | permissionError: 'You Cant Use It', 5 | description: 'Deletes Message', //Optional 6 | callback: (message, args) => { 7 | const amount = parseInt(args[0]) + 1; 8 | 9 | if (isNaN(amount)) { 10 | return message.channel.send('Please Enter A Number.') 11 | } else if (amount <= 1 || amount > 100) { 12 | return message.channel.send('You Can Only Delete Messages From 1 To 99.') 13 | } 14 | 15 | message.channel.bulkDelete(amount, true).catch(err => { 16 | console.error(err); 17 | message.channel.send('There Was An Error Deleting Messages In This Cahnnel.') 18 | }) 19 | } 20 | } -------------------------------------------------------------------------------- /Episode 14/commands/Music/queue.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed, guild } = require("discord.js") 2 | 3 | module.exports = { 4 | commands: ['queue', 'q'], // You Can Keep Any Name 5 | description: 'Shows Queue Of Music.', // Optional 6 | 7 | callback: (message, args) => { 8 | 9 | const serverQueue = message.client.queue.get(message.guild.id) // To Check If Music Is Being Played. 10 | if(!serverQueue) return message.reply('There Is No Music Being Played, Cant Show Queue.') // If No Music Is Being Played or BOT Isn't In VC. 11 | 12 | const q = serverQueue.songs 13 | 14 | const embed = new MessageEmbed() 15 | .setTitle('Queue') 16 | .setTimestamp() 17 | .setColor('RANDOM') 18 | .setFooter('Song Queue') 19 | for (var key in q) { embed.addFields({ name: '\u200b' + `${parseInt(key) + 1}` + ') ' +q[key].title, 20 | value: '' }) } 21 | message.channel.send(embed) 22 | } 23 | } -------------------------------------------------------------------------------- /Episode 14/commands/load-commands.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | const fs = require('fs') 3 | 4 | module.exports = (client) => { 5 | const baseFile = 'command-base.js' 6 | const commandBase = require(`./${baseFile}`) 7 | 8 | const commands = [] 9 | 10 | const readCommands = (dir) => { 11 | const files = fs.readdirSync(path.join(__dirname, dir)) 12 | for (const file of files) { 13 | const stat = fs.lstatSync(path.join(__dirname, dir, file)) 14 | if (stat.isDirectory()) { 15 | readCommands(path.join(dir, file)) 16 | } else if (file !== baseFile && file !== 'load-commands.js') { 17 | const option = require(path.join(__dirname, dir, file)) 18 | commands.push(option) 19 | if (client) { 20 | commandBase(client, option) 21 | } 22 | } 23 | } 24 | } 25 | 26 | readCommands('.') // To Read All Commands of 'commands' Folder 27 | 28 | return commands 29 | } 30 | -------------------------------------------------------------------------------- /Episode 14/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "token": "Your-Token", 3 | "prefix": "+" 4 | } 5 | -------------------------------------------------------------------------------- /Episode 14/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tutorial-bot", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "TTC", 10 | "license": "ISC", 11 | "dependencies": { 12 | "@discordjs/opus": "^0.3.3", 13 | "@distube/ytpl": "^1.0.10", 14 | "discord.js": "^12.5.1", 15 | "ffmpeg": "0.0.4", 16 | "ffmpeg-static": "^4.2.7", 17 | "ms": "^2.1.3", 18 | "node-opus": "^0.3.3", 19 | "opusscript": "0.0.7", 20 | "youtube-sr": "^2.0.5", 21 | "ytdl-core": "^4.0.5" 22 | } 23 | -------------------------------------------------------------------------------- /Episode 15/commands/Fun/ping.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['p', 'ping'], // You Can Keep Any Name 3 | description: 'Smple Ping Command', //Optional 4 | callback: (message, args) => { 5 | message.channel.send('Pong!') 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Episode 15/commands/Fun/youtube.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['youtube', 'yt'], // You Can Keep Any Name 3 | description: 'Sends YT Link', // Optional 4 | callback: (message, args) => { 5 | message.channel.send('https://youtube.com/techtipcyber') 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Episode 15/commands/Mod/ban.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | 3 | module.exports = { 4 | commands: 'ban', // You Can Keep Any Name 5 | description: 'Bans A User.', // Optional 6 | permissions: 'BAN_MEMBERS', // You Can Keep Any Permissions 7 | permissionError: 'You Dont Have Perms To Ban Someone', 8 | expectedArgs: '+ban @User', // Optional 9 | 10 | callback: (message, args) => { 11 | const member = message.mentions.members.first() 12 | if(!member) return message.reply('You Need To Mention A Member To Ban.') // Mention To Ban. 13 | member.ban() 14 | 15 | const embed = new MessageEmbed() 16 | .setTitle('User Banned') 17 | .setDescription(`<@${member.user.id}> Has Been Banned.`) 18 | .addField('Banned By', message.author) 19 | .setColor('RANDOM') 20 | message.channel.send(embed) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Episode 15/commands/Mod/kick.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | 3 | module.exports = { 4 | commands: 'kick', // You Can Keep Any Name 5 | description: 'Kicks A User.', // Optional 6 | permissions: 'KICK_MEMBERS', // You Can Keep Any Permissions 7 | permissionError: 'You Dont Have Perms To Kick Someone', 8 | expectedArgs: '+Kick @User', // Optional 9 | 10 | callback: (message, args) => { 11 | const member = message.mentions.members.first() 12 | if(!member) return message.reply('You Need To Mention A Member To Kick.') // Mention To Kick. 13 | member.kick() 14 | 15 | const embed = new MessageEmbed() 16 | .setTitle('User Kicked') 17 | .setDescription(`<@${member.user.id}> Has Been Kicked.`) 18 | .addField('Kicked By', message.author) 19 | .setColor('RANDOM') 20 | message.channel.send(embed) 21 | } 22 | } -------------------------------------------------------------------------------- /Episode 15/commands/Mod/purge.js: -------------------------------------------------------------------------------- 1 | module.exports ={ 2 | commands: ['del', 'purge'], // You Can Keep Any Name 3 | permissions: 'ADMINISTRATOR', // You Can Keep Any Permission 4 | permissionError: 'You Cant Use It', 5 | description: 'Deletes Message', //Optional 6 | callback: (message, args) => { 7 | const amount = parseInt(args[0]) + 1; 8 | 9 | if (isNaN(amount)) { 10 | return message.channel.send('Please Enter A Number.') 11 | } else if (amount <= 1 || amount > 100) { 12 | return message.channel.send('You Can Only Delete Messages From 1 To 99.') 13 | } 14 | 15 | message.channel.bulkDelete(amount, true).catch(err => { 16 | console.error(err); 17 | message.channel.send('There Was An Error Deleting Messages In This Cahnnel.') 18 | }) 19 | } 20 | } -------------------------------------------------------------------------------- /Episode 15/commands/Music/queue.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed, guild } = require("discord.js") 2 | 3 | module.exports = { 4 | commands: ['queue', 'q'], // You Can Keep Any Name 5 | description: 'Shows Queue Of Music.', // Optional 6 | 7 | callback: (message, args) => { 8 | 9 | const serverQueue = message.client.queue.get(message.guild.id) // To Check If Music Is Being Played. 10 | if(!serverQueue) return message.reply('There Is No Music Being Played, Cant Show Queue.') // If No Music Is Being Played or BOT Isn't In VC. 11 | 12 | const q = serverQueue.songs 13 | 14 | const embed = new MessageEmbed() 15 | .setTitle('Queue') 16 | .setTimestamp() 17 | .setColor('RANDOM') 18 | .setFooter('Song Queue') 19 | for (var key in q) { embed.addFields({ name: '\u200b' + `${parseInt(key) + 1}` + ') ' +q[key].title, 20 | value: '' }) } 21 | message.channel.send(embed) 22 | } 23 | } -------------------------------------------------------------------------------- /Episode 15/commands/load-commands.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | const fs = require('fs') 3 | 4 | module.exports = (client) => { 5 | const baseFile = 'command-base.js' 6 | const commandBase = require(`./${baseFile}`) 7 | 8 | const commands = [] 9 | 10 | const readCommands = (dir) => { 11 | const files = fs.readdirSync(path.join(__dirname, dir)) 12 | for (const file of files) { 13 | const stat = fs.lstatSync(path.join(__dirname, dir, file)) 14 | if (stat.isDirectory()) { 15 | readCommands(path.join(dir, file)) 16 | } else if (file !== baseFile && file !== 'load-commands.js') { 17 | const option = require(path.join(__dirname, dir, file)) 18 | commands.push(option) 19 | if (client) { 20 | commandBase(client, option) 21 | } 22 | } 23 | } 24 | } 25 | 26 | readCommands('.') // To Read All Commands of 'commands' Folder 27 | 28 | return commands 29 | } 30 | -------------------------------------------------------------------------------- /Episode 15/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "token": "Your-Token", 3 | "prefix": "+" 4 | } 5 | -------------------------------------------------------------------------------- /Episode 15/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tutorial-bot", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "TTC", 10 | "license": "ISC", 11 | "dependencies": { 12 | "@discordjs/opus": "^0.3.3", 13 | "@distube/ytpl": "^1.0.10", 14 | "discord.js": "^12.5.1", 15 | "ffmpeg": "0.0.4", 16 | "ffmpeg-static": "^4.2.7", 17 | "moment": "^2.29.1", 18 | "ms": "^2.1.3", 19 | "node-fetch": "^2.6.1", 20 | "node-opus": "^0.3.3", 21 | "opusscript": "0.0.7", 22 | "youtube-sr": "^2.0.5", 23 | "ytdl-core": "^4.0.5" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Episode 16/commands/Fun/ping.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['p', 'ping'], // You Can Keep Any Name 3 | description: 'Smple Ping Command', //Optional 4 | callback: (message, args) => { 5 | message.channel.send('Pong!') 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Episode 16/commands/Fun/youtube.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['youtube', 'yt'], // You Can Keep Any Name 3 | description: 'Sends YT Link', // Optional 4 | callback: (message, args) => { 5 | message.channel.send('https://youtube.com/techtipcyber') 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Episode 16/commands/Mod/ban.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | 3 | module.exports = { 4 | commands: 'ban', // You Can Keep Any Name 5 | description: 'Bans A User.', // Optional 6 | permissions: 'BAN_MEMBERS', // You Can Keep Any Permissions 7 | permissionError: 'You Dont Have Perms To Ban Someone', 8 | expectedArgs: '+ban @User', // Optional 9 | 10 | callback: (message, args) => { 11 | const member = message.mentions.members.first() 12 | if(!member) return message.reply('You Need To Mention A Member To Ban.') // Mention To Ban. 13 | member.ban() 14 | 15 | const embed = new MessageEmbed() 16 | .setTitle('User Banned') 17 | .setDescription(`<@${member.user.id}> Has Been Banned.`) 18 | .addField('Banned By', message.author) 19 | .setColor('RANDOM') 20 | message.channel.send(embed) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Episode 16/commands/Mod/kick.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | 3 | module.exports = { 4 | commands: 'kick', // You Can Keep Any Name 5 | description: 'Kicks A User.', // Optional 6 | permissions: 'KICK_MEMBERS', // You Can Keep Any Permissions 7 | permissionError: 'You Dont Have Perms To Kick Someone', 8 | expectedArgs: '+Kick @User', // Optional 9 | 10 | callback: (message, args) => { 11 | const member = message.mentions.members.first() 12 | if(!member) return message.reply('You Need To Mention A Member To Kick.') // Mention To Kick. 13 | member.kick() 14 | 15 | const embed = new MessageEmbed() 16 | .setTitle('User Kicked') 17 | .setDescription(`<@${member.user.id}> Has Been Kicked.`) 18 | .addField('Kicked By', message.author) 19 | .setColor('RANDOM') 20 | message.channel.send(embed) 21 | } 22 | } -------------------------------------------------------------------------------- /Episode 16/commands/Mod/purge.js: -------------------------------------------------------------------------------- 1 | module.exports ={ 2 | commands: ['del', 'purge'], // You Can Keep Any Name 3 | permissions: 'ADMINISTRATOR', // You Can Keep Any Permission 4 | permissionError: 'You Cant Use It', 5 | description: 'Deletes Message', //Optional 6 | callback: (message, args) => { 7 | const amount = parseInt(args[0]) + 1; 8 | 9 | if (isNaN(amount)) { 10 | return message.channel.send('Please Enter A Number.') 11 | } else if (amount <= 1 || amount > 100) { 12 | return message.channel.send('You Can Only Delete Messages From 1 To 99.') 13 | } 14 | 15 | message.channel.bulkDelete(amount, true).catch(err => { 16 | console.error(err); 17 | message.channel.send('There Was An Error Deleting Messages In This Cahnnel.') 18 | }) 19 | } 20 | } -------------------------------------------------------------------------------- /Episode 16/commands/Music/queue.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed, guild } = require("discord.js") 2 | 3 | module.exports = { 4 | commands: ['queue', 'q'], // You Can Keep Any Name 5 | description: 'Shows Queue Of Music.', // Optional 6 | 7 | callback: (message, args) => { 8 | 9 | const serverQueue = message.client.queue.get(message.guild.id) // To Check If Music Is Being Played. 10 | if(!serverQueue) return message.reply('There Is No Music Being Played, Cant Show Queue.') // If No Music Is Being Played or BOT Isn't In VC. 11 | 12 | const q = serverQueue.songs 13 | 14 | const embed = new MessageEmbed() 15 | .setTitle('Queue') 16 | .setTimestamp() 17 | .setColor('RANDOM') 18 | .setFooter('Song Queue') 19 | for (var key in q) { embed.addFields({ name: '\u200b' + `${parseInt(key) + 1}` + ') ' +q[key].title, 20 | value: '' }) } 21 | message.channel.send(embed) 22 | } 23 | } -------------------------------------------------------------------------------- /Episode 16/commands/load-commands.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | const fs = require('fs') 3 | 4 | module.exports = (client) => { 5 | const baseFile = 'command-base.js' 6 | const commandBase = require(`./${baseFile}`) 7 | 8 | const commands = [] 9 | 10 | const readCommands = (dir) => { 11 | const files = fs.readdirSync(path.join(__dirname, dir)) 12 | for (const file of files) { 13 | const stat = fs.lstatSync(path.join(__dirname, dir, file)) 14 | if (stat.isDirectory()) { 15 | readCommands(path.join(dir, file)) 16 | } else if (file !== baseFile && file !== 'load-commands.js') { 17 | const option = require(path.join(__dirname, dir, file)) 18 | commands.push(option) 19 | if (client) { 20 | commandBase(client, option) 21 | } 22 | } 23 | } 24 | } 25 | 26 | readCommands('.') // To Read All Commands of 'commands' Folder 27 | 28 | return commands 29 | } 30 | -------------------------------------------------------------------------------- /Episode 16/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "token": "Your-Token", 3 | "prefix": "+" 4 | } 5 | -------------------------------------------------------------------------------- /Episode 16/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tutorial-bot", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "TTC", 10 | "license": "ISC", 11 | "dependencies": { 12 | "@discordjs/opus": "^0.3.3", 13 | "@distube/ytpl": "^1.0.10", 14 | "discord.js": "^12.5.1", 15 | "ffmpeg": "0.0.4", 16 | "ffmpeg-static": "^4.2.7", 17 | "moment": "^2.29.1", 18 | "ms": "^2.1.3", 19 | "node-fetch": "^2.6.1", 20 | "node-opus": "^0.3.3", 21 | "opusscript": "0.0.7", 22 | "youtube-sr": "^2.0.5", 23 | "ytdl-core": "^4.0.5" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Episode 17/commands/Fun/ping.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['p', 'ping'], // You Can Keep Any Name 3 | description: 'Smple Ping Command', //Optional 4 | callback: (message, args) => { 5 | message.channel.send('Pong!') 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Episode 17/commands/Fun/youtube.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['youtube', 'yt'], // You Can Keep Any Name 3 | description: 'Sends YT Link', // Optional 4 | callback: (message, args) => { 5 | message.channel.send('https://youtube.com/techtipcyber') 6 | } 7 | -------------------------------------------------------------------------------- /Episode 17/commands/Mod/ban.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | 3 | module.exports = { 4 | commands: 'ban', // You Can Keep Any Name 5 | description: 'Bans A User.', // Optional 6 | permissions: 'BAN_MEMBERS', // You Can Keep Any Permissions 7 | permissionError: 'You Dont Have Perms To Ban Someone', 8 | expectedArgs: '+ban @User', // Optional 9 | 10 | callback: (message, args) => { 11 | const member = message.mentions.members.first() 12 | if(!member) return message.reply('You Need To Mention A Member To Ban.') // Mention To Ban. 13 | member.ban() 14 | 15 | const embed = new MessageEmbed() 16 | .setTitle('User Banned') 17 | .setDescription(`<@${member.user.id}> Has Been Banned.`) 18 | .addField('Banned By', message.author) 19 | .setColor('RANDOM') 20 | message.channel.send(embed) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Episode 17/commands/Mod/kick.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | 3 | module.exports = { 4 | commands: 'kick', // You Can Keep Any Name 5 | description: 'Kicks A User.', // Optional 6 | permissions: 'KICK_MEMBERS', // You Can Keep Any Permissions 7 | permissionError: 'You Dont Have Perms To Kick Someone', 8 | expectedArgs: '+Kick @User', // Optional 9 | 10 | callback: (message, args) => { 11 | const member = message.mentions.members.first() 12 | if(!member) return message.reply('You Need To Mention A Member To Kick.') // Mention To Kick. 13 | member.kick() 14 | 15 | const embed = new MessageEmbed() 16 | .setTitle('User Kicked') 17 | .setDescription(`<@${member.user.id}> Has Been Kicked.`) 18 | .addField('Kicked By', message.author) 19 | .setColor('RANDOM') 20 | message.channel.send(embed) 21 | } 22 | } -------------------------------------------------------------------------------- /Episode 17/commands/Mod/purge.js: -------------------------------------------------------------------------------- 1 | module.exports ={ 2 | commands: ['del', 'purge'], // You Can Keep Any Name 3 | permissions: 'ADMINISTRATOR', // You Can Keep Any Permission 4 | permissionError: 'You Cant Use It', 5 | description: 'Deletes Message', //Optional 6 | callback: (message, args) => { 7 | const amount = parseInt(args[0]) + 1; 8 | 9 | if (isNaN(amount)) { 10 | return message.channel.send('Please Enter A Number.') 11 | } else if (amount <= 1 || amount > 100) { 12 | return message.channel.send('You Can Only Delete Messages From 1 To 99.') 13 | } 14 | 15 | message.channel.bulkDelete(amount, true).catch(err => { 16 | console.error(err); 17 | message.channel.send('There Was An Error Deleting Messages In This Cahnnel.') 18 | }) 19 | } 20 | } -------------------------------------------------------------------------------- /Episode 17/commands/Music/queue.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed, guild } = require("discord.js") 2 | 3 | module.exports = { 4 | commands: ['queue', 'q'], // You Can Keep Any Name 5 | description: 'Shows Queue Of Music.', // Optional 6 | 7 | callback: (message, args) => { 8 | 9 | const serverQueue = message.client.queue.get(message.guild.id) // To Check If Music Is Being Played. 10 | if(!serverQueue) return message.reply('There Is No Music Being Played, Cant Show Queue.') // If No Music Is Being Played or BOT Isn't In VC. 11 | 12 | const q = serverQueue.songs 13 | 14 | const embed = new MessageEmbed() 15 | .setTitle('Queue') 16 | .setTimestamp() 17 | .setColor('RANDOM') 18 | .setFooter('Song Queue') 19 | for (var key in q) { embed.addFields({ name: '\u200b' + `${parseInt(key) + 1}` + ') ' +q[key].title, 20 | value: '' }) } 21 | message.channel.send(embed) 22 | } 23 | } -------------------------------------------------------------------------------- /Episode 17/commands/load-commands.js: -------------------------------------------------------------------------------- 1 | 2 | const path = require('path') 3 | const fs = require('fs') 4 | 5 | module.exports = (client) => { 6 | const baseFile = 'command-base.js' 7 | const commandBase = require(`./${baseFile}`) 8 | 9 | const commands = [] 10 | 11 | const readCommands = (dir) => { 12 | const files = fs.readdirSync(path.join(__dirname, dir)) 13 | for (const file of files) { 14 | const stat = fs.lstatSync(path.join(__dirname, dir, file)) 15 | if (stat.isDirectory()) { 16 | readCommands(path.join(dir, file)) 17 | } else if (file !== baseFile && file !== 'load-commands.js') { 18 | const option = require(path.join(__dirname, dir, file)) 19 | commands.push(option) 20 | if (client) { 21 | commandBase(client, option) 22 | } 23 | } 24 | } 25 | } 26 | 27 | readCommands('.') // To Read All Commands of 'commands' Folder 28 | 29 | return commands 30 | } 31 | -------------------------------------------------------------------------------- /Episode 17/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "token": "Your-Token", 3 | "prefix": "+" 4 | } 5 | -------------------------------------------------------------------------------- /Episode 17/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tutorial-bot", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "TTC", 10 | "license": "ISC", 11 | "dependencies": { 12 | "@discordjs/opus": "^0.3.3", 13 | "@distube/ytpl": "^1.0.10", 14 | "discord.js": "^12.5.1", 15 | "ffmpeg": "0.0.4", 16 | "ffmpeg-static": "^4.2.7", 17 | "moment": "^2.29.1", 18 | "ms": "^2.1.3", 19 | "node-fetch": "^2.6.1", 20 | "node-opus": "^0.3.3", 21 | "opusscript": "0.0.7", 22 | "youtube-sr": "^2.0.5", 23 | "ytdl-core": "^4.0.5" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Episode 18/commands/Fun/ping.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['p', 'ping'], // You Can Keep Any Name 3 | description: 'Smple Ping Command', //Optional 4 | callback: (message, args) => { 5 | message.channel.send('Pong!') 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Episode 18/commands/Fun/youtube.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['youtube', 'yt'], // You Can Keep Any Name 3 | description: 'Sends YT Link', // Optional 4 | callback: (message, args) => { 5 | message.channel.send('https://youtube.com/techtipcyber') 6 | } 7 | -------------------------------------------------------------------------------- /Episode 18/commands/Mod/ban.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | 3 | module.exports = { 4 | commands: 'ban', // You Can Keep Any Name 5 | description: 'Bans A User.', // Optional 6 | permissions: 'BAN_MEMBERS', // You Can Keep Any Permissions 7 | permissionError: 'You Dont Have Perms To Ban Someone', 8 | expectedArgs: '+ban @User', // Optional 9 | 10 | callback: (message, args) => { 11 | const member = message.mentions.members.first() 12 | if(!member) return message.reply('You Need To Mention A Member To Ban.') // Mention To Ban. 13 | member.ban() 14 | 15 | const embed = new MessageEmbed() 16 | .setTitle('User Banned') 17 | .setDescription(`<@${member.user.id}> Has Been Banned.`) 18 | .addField('Banned By', message.author) 19 | .setColor('RANDOM') 20 | message.channel.send(embed) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Episode 18/commands/Mod/kick.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | 3 | module.exports = { 4 | commands: 'kick', // You Can Keep Any Name 5 | description: 'Kicks A User.', // Optional 6 | permissions: 'KICK_MEMBERS', // You Can Keep Any Permissions 7 | permissionError: 'You Dont Have Perms To Kick Someone', 8 | expectedArgs: '+Kick @User', // Optional 9 | 10 | callback: (message, args) => { 11 | const member = message.mentions.members.first() 12 | if(!member) return message.reply('You Need To Mention A Member To Kick.') // Mention To Kick. 13 | member.kick() 14 | 15 | const embed = new MessageEmbed() 16 | .setTitle('User Kicked') 17 | .setDescription(`<@${member.user.id}> Has Been Kicked.`) 18 | .addField('Kicked By', message.author) 19 | .setColor('RANDOM') 20 | message.channel.send(embed) 21 | } 22 | } -------------------------------------------------------------------------------- /Episode 18/commands/Mod/purge.js: -------------------------------------------------------------------------------- 1 | module.exports ={ 2 | commands: ['del', 'purge'], // You Can Keep Any Name 3 | permissions: 'ADMINISTRATOR', // You Can Keep Any Permission 4 | permissionError: 'You Cant Use It', 5 | description: 'Deletes Message', //Optional 6 | callback: (message, args) => { 7 | const amount = parseInt(args[0]) + 1; 8 | 9 | if (isNaN(amount)) { 10 | return message.channel.send('Please Enter A Number.') 11 | } else if (amount <= 1 || amount > 100) { 12 | return message.channel.send('You Can Only Delete Messages From 1 To 99.') 13 | } 14 | 15 | message.channel.bulkDelete(amount, true).catch(err => { 16 | console.error(err); 17 | message.channel.send('There Was An Error Deleting Messages In This Cahnnel.') 18 | }) 19 | } 20 | } -------------------------------------------------------------------------------- /Episode 18/commands/Music/queue.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed, guild } = require("discord.js") 2 | 3 | module.exports = { 4 | commands: ['queue', 'q'], // You Can Keep Any Name 5 | description: 'Shows Queue Of Music.', // Optional 6 | 7 | callback: (message, args) => { 8 | 9 | const serverQueue = message.client.queue.get(message.guild.id) // To Check If Music Is Being Played. 10 | if(!serverQueue) return message.reply('There Is No Music Being Played, Cant Show Queue.') // If No Music Is Being Played or BOT Isn't In VC. 11 | 12 | const q = serverQueue.songs 13 | 14 | const embed = new MessageEmbed() 15 | .setTitle('Queue') 16 | .setTimestamp() 17 | .setColor('RANDOM') 18 | .setFooter('Song Queue') 19 | for (var key in q) { embed.addFields({ name: '\u200b' + `${parseInt(key) + 1}` + ') ' +q[key].title, 20 | value: '' }) } 21 | message.channel.send(embed) 22 | } 23 | } -------------------------------------------------------------------------------- /Episode 18/commands/load-commands.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | const fs = require('fs') 3 | 4 | module.exports = (client) => { 5 | const baseFile = 'command-base.js' 6 | const commandBase = require(`./${baseFile}`) 7 | 8 | const commands = [] 9 | 10 | const readCommands = (dir) => { 11 | const files = fs.readdirSync(path.join(__dirname, dir)) 12 | for (const file of files) { 13 | const stat = fs.lstatSync(path.join(__dirname, dir, file)) 14 | if (stat.isDirectory()) { 15 | readCommands(path.join(dir, file)) 16 | } else if (file !== baseFile && file !== 'load-commands.js') { 17 | const option = require(path.join(__dirname, dir, file)) 18 | commands.push(option) 19 | if (client) { 20 | commandBase(client, option) 21 | } 22 | } 23 | } 24 | } 25 | 26 | readCommands('.') // To Read All Commands of 'commands' Folder 27 | 28 | return commands 29 | } 30 | -------------------------------------------------------------------------------- /Episode 18/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "token": "Your-Token", 3 | "prefix": "+" 4 | } 5 | -------------------------------------------------------------------------------- /Episode 18/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tutorial-bot", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "TTC", 10 | "license": "ISC", 11 | "dependencies": { 12 | "@discordjs/opus": "^0.3.3", 13 | "@distube/ytpl": "^1.0.10", 14 | "discord.js": "^12.5.1", 15 | "ffmpeg": "0.0.4", 16 | "ffmpeg-static": "^4.2.7", 17 | "moment": "^2.29.1", 18 | "ms": "^2.1.3", 19 | "node-fetch": "^2.6.1", 20 | "node-opus": "^0.3.3", 21 | "opusscript": "0.0.7", 22 | "youtube-sr": "^2.0.5", 23 | "ytdl-core": "^4.0.5" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Episode 19/commands/Fun/ping.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['p', 'ping'], // You Can Keep Any Name 3 | description: 'Smple Ping Command', //Optional 4 | callback: (message, args) => { 5 | message.channel.send('Pong!') 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Episode 19/commands/Fun/youtube.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['youtube', 'yt'], // You Can Keep Any Name 3 | description: 'Sends YT Link', // Optional 4 | callback: (message, args) => { 5 | message.channel.send('https://youtube.com/techtipcyber') 6 | } 7 | -------------------------------------------------------------------------------- /Episode 19/commands/Mod/ban.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | 3 | module.exports = { 4 | commands: 'ban', // You Can Keep Any Name 5 | description: 'Bans A User.', // Optional 6 | permissions: 'BAN_MEMBERS', // You Can Keep Any Permissions 7 | permissionError: 'You Dont Have Perms To Ban Someone', 8 | expectedArgs: '+ban @User', // Optional 9 | 10 | callback: (message, args) => { 11 | const member = message.mentions.members.first() 12 | if(!member) return message.reply('You Need To Mention A Member To Ban.') // Mention To Ban. 13 | member.ban() 14 | 15 | const embed = new MessageEmbed() 16 | .setTitle('User Banned') 17 | .setDescription(`<@${member.user.id}> Has Been Banned.`) 18 | .addField('Banned By', message.author) 19 | .setColor('RANDOM') 20 | message.channel.send(embed) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Episode 19/commands/Mod/kick.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | 3 | module.exports = { 4 | commands: 'kick', // You Can Keep Any Name 5 | description: 'Kicks A User.', // Optional 6 | permissions: 'KICK_MEMBERS', // You Can Keep Any Permissions 7 | permissionError: 'You Dont Have Perms To Kick Someone', 8 | expectedArgs: '+Kick @User', // Optional 9 | 10 | callback: (message, args) => { 11 | const member = message.mentions.members.first() 12 | if(!member) return message.reply('You Need To Mention A Member To Kick.') // Mention To Kick. 13 | member.kick() 14 | 15 | const embed = new MessageEmbed() 16 | .setTitle('User Kicked') 17 | .setDescription(`<@${member.user.id}> Has Been Kicked.`) 18 | .addField('Kicked By', message.author) 19 | .setColor('RANDOM') 20 | message.channel.send(embed) 21 | } 22 | } -------------------------------------------------------------------------------- /Episode 19/commands/Mod/purge.js: -------------------------------------------------------------------------------- 1 | module.exports ={ 2 | commands: ['del', 'purge'], // You Can Keep Any Name 3 | permissions: 'ADMINISTRATOR', // You Can Keep Any Permission 4 | permissionError: 'You Cant Use It', 5 | description: 'Deletes Message', //Optional 6 | callback: (message, args) => { 7 | const amount = parseInt(args[0]) + 1; 8 | 9 | if (isNaN(amount)) { 10 | return message.channel.send('Please Enter A Number.') 11 | } else if (amount <= 1 || amount > 100) { 12 | return message.channel.send('You Can Only Delete Messages From 1 To 99.') 13 | } 14 | 15 | message.channel.bulkDelete(amount, true).catch(err => { 16 | console.error(err); 17 | message.channel.send('There Was An Error Deleting Messages In This Cahnnel.') 18 | }) 19 | } 20 | } -------------------------------------------------------------------------------- /Episode 19/commands/Music/queue.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed, guild } = require("discord.js") 2 | 3 | module.exports = { 4 | commands: ['queue', 'q'], // You Can Keep Any Name 5 | description: 'Shows Queue Of Music.', // Optional 6 | 7 | callback: (message, args) => { 8 | 9 | const serverQueue = message.client.queue.get(message.guild.id) // To Check If Music Is Being Played. 10 | if(!serverQueue) return message.reply('There Is No Music Being Played, Cant Show Queue.') // If No Music Is Being Played or BOT Isn't In VC. 11 | 12 | const q = serverQueue.songs 13 | 14 | const embed = new MessageEmbed() 15 | .setTitle('Queue') 16 | .setTimestamp() 17 | .setColor('RANDOM') 18 | .setFooter('Song Queue') 19 | for (var key in q) { embed.addFields({ name: '\u200b' + `${parseInt(key) + 1}` + ') ' +q[key].title, 20 | value: '' }) } 21 | message.channel.send(embed) 22 | } 23 | } -------------------------------------------------------------------------------- /Episode 19/commands/load-commands.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | const fs = require('fs') 3 | 4 | module.exports = (client) => { 5 | const baseFile = 'command-base.js' 6 | const commandBase = require(`./${baseFile}`) 7 | 8 | const commands = [] 9 | 10 | const readCommands = (dir) => { 11 | const files = fs.readdirSync(path.join(__dirname, dir)) 12 | for (const file of files) { 13 | const stat = fs.lstatSync(path.join(__dirname, dir, file)) 14 | if (stat.isDirectory()) { 15 | readCommands(path.join(dir, file)) 16 | } else if (file !== baseFile && file !== 'load-commands.js') { 17 | const option = require(path.join(__dirname, dir, file)) 18 | commands.push(option) 19 | if (client) { 20 | commandBase(client, option) 21 | } 22 | } 23 | } 24 | } 25 | 26 | readCommands('.') // To Read All Commands of 'commands' Folder 27 | 28 | return commands 29 | } 30 | -------------------------------------------------------------------------------- /Episode 19/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "token": "Your-Token", 3 | "prefix": "+" 4 | } 5 | -------------------------------------------------------------------------------- /Episode 19/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tutorial-bot", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "TTC", 10 | "license": "ISC", 11 | "dependencies": { 12 | "@discordjs/opus": "^0.3.3", 13 | "@distube/ytpl": "^1.0.10", 14 | "discord.js": "^12.5.1", 15 | "ffmpeg": "0.0.4", 16 | "ffmpeg-static": "^4.2.7", 17 | "moment": "^2.29.1", 18 | "ms": "^2.1.3", 19 | "node-fetch": "^2.6.1", 20 | "node-opus": "^0.3.3", 21 | "opusscript": "0.0.7", 22 | "youtube-sr": "^2.0.5", 23 | "ytdl-core": "^4.0.5" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Episode 20/commands/Fun/ping.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['p', 'ping'], // You Can Keep Any Name 3 | description: 'Smple Ping Command', //Optional 4 | callback: (message, args) => { 5 | message.channel.send('Pong!') 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Episode 20/commands/Fun/youtube.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['youtube', 'yt'], // You Can Keep Any Name 3 | description: 'Sends YT Link', // Optional 4 | callback: (message, args) => { 5 | message.channel.send('https://youtube.com/techtipcyber') 6 | } 7 | -------------------------------------------------------------------------------- /Episode 20/commands/Mod/ban.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | 3 | module.exports = { 4 | commands: 'ban', // You Can Keep Any Name 5 | description: 'Bans A User.', // Optional 6 | permissions: 'BAN_MEMBERS', // You Can Keep Any Permissions 7 | permissionError: 'You Dont Have Perms To Ban Someone', 8 | expectedArgs: '+ban @User', // Optional 9 | 10 | callback: (message, args) => { 11 | const member = message.mentions.members.first() 12 | if(!member) return message.reply('You Need To Mention A Member To Ban.') // Mention To Ban. 13 | member.ban() 14 | 15 | const embed = new MessageEmbed() 16 | .setTitle('User Banned') 17 | .setDescription(`<@${member.user.id}> Has Been Banned.`) 18 | .addField('Banned By', message.author) 19 | .setColor('RANDOM') 20 | message.channel.send(embed) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Episode 20/commands/Mod/kick.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | 3 | module.exports = { 4 | commands: 'kick', // You Can Keep Any Name 5 | description: 'Kicks A User.', // Optional 6 | permissions: 'KICK_MEMBERS', // You Can Keep Any Permissions 7 | permissionError: 'You Dont Have Perms To Kick Someone', 8 | expectedArgs: '+Kick @User', // Optional 9 | 10 | callback: (message, args) => { 11 | const member = message.mentions.members.first() 12 | if(!member) return message.reply('You Need To Mention A Member To Kick.') // Mention To Kick. 13 | member.kick() 14 | 15 | const embed = new MessageEmbed() 16 | .setTitle('User Kicked') 17 | .setDescription(`<@${member.user.id}> Has Been Kicked.`) 18 | .addField('Kicked By', message.author) 19 | .setColor('RANDOM') 20 | message.channel.send(embed) 21 | } 22 | } -------------------------------------------------------------------------------- /Episode 20/commands/Mod/purge.js: -------------------------------------------------------------------------------- 1 | module.exports ={ 2 | commands: ['del', 'purge'], // You Can Keep Any Name 3 | permissions: 'ADMINISTRATOR', // You Can Keep Any Permission 4 | permissionError: 'You Cant Use It', 5 | description: 'Deletes Message', //Optional 6 | callback: (message, args) => { 7 | const amount = parseInt(args[0]) + 1; 8 | 9 | if (isNaN(amount)) { 10 | return message.channel.send('Please Enter A Number.') 11 | } else if (amount <= 1 || amount > 100) { 12 | return message.channel.send('You Can Only Delete Messages From 1 To 99.') 13 | } 14 | 15 | message.channel.bulkDelete(amount, true).catch(err => { 16 | console.error(err); 17 | message.channel.send('There Was An Error Deleting Messages In This Cahnnel.') 18 | }) 19 | } 20 | } -------------------------------------------------------------------------------- /Episode 20/commands/Music/queue.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed, guild } = require("discord.js") 2 | 3 | module.exports = { 4 | commands: ['queue', 'q'], // You Can Keep Any Name 5 | description: 'Shows Queue Of Music.', // Optional 6 | 7 | callback: (message, args) => { 8 | 9 | const serverQueue = message.client.queue.get(message.guild.id) // To Check If Music Is Being Played. 10 | if(!serverQueue) return message.reply('There Is No Music Being Played, Cant Show Queue.') // If No Music Is Being Played or BOT Isn't In VC. 11 | 12 | const q = serverQueue.songs 13 | 14 | const embed = new MessageEmbed() 15 | .setTitle('Queue') 16 | .setTimestamp() 17 | .setColor('RANDOM') 18 | .setFooter('Song Queue') 19 | for (var key in q) { embed.addFields({ name: '\u200b' + `${parseInt(key) + 1}` + ') ' +q[key].title, 20 | value: '' }) } 21 | message.channel.send(embed) 22 | } 23 | } -------------------------------------------------------------------------------- /Episode 20/commands/load-commands.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | const fs = require('fs') 3 | 4 | module.exports = (client) => { 5 | const baseFile = 'command-base.js' 6 | const commandBase = require(`./${baseFile}`) 7 | 8 | const commands = [] 9 | 10 | const readCommands = (dir) => { 11 | const files = fs.readdirSync(path.join(__dirname, dir)) 12 | for (const file of files) { 13 | const stat = fs.lstatSync(path.join(__dirname, dir, file)) 14 | if (stat.isDirectory()) { 15 | readCommands(path.join(dir, file)) 16 | } else if (file !== baseFile && file !== 'load-commands.js') { 17 | const option = require(path.join(__dirname, dir, file)) 18 | commands.push(option) 19 | if (client) { 20 | commandBase(client, option) 21 | } 22 | } 23 | } 24 | } 25 | 26 | readCommands('.') // To Read All Commands of 'commands' Folder 27 | 28 | return commands 29 | } 30 | -------------------------------------------------------------------------------- /Episode 20/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "token": "Your-Token", 3 | "prefix": "+" 4 | } 5 | -------------------------------------------------------------------------------- /Episode 20/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tutorial-bot", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "TTC", 10 | "license": "ISC", 11 | "dependencies": { 12 | "@discordjs/opus": "^0.3.3", 13 | "@distube/ytpl": "^1.0.10", 14 | "discord.js": "^12.5.1", 15 | "ffmpeg": "0.0.4", 16 | "ffmpeg-static": "^4.2.7", 17 | "moment": "^2.29.1", 18 | "ms": "^2.1.3", 19 | "node-fetch": "^2.6.1", 20 | "node-opus": "^0.3.3", 21 | "opusscript": "0.0.7", 22 | "youtube-sr": "^2.0.5", 23 | "ytdl-core": "^4.0.5" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Episode 21/commands/Fun/ping.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['p', 'ping'], // You Can Keep Any Name 3 | description: 'Smple Ping Command', //Optional 4 | callback: (message, args) => { 5 | message.channel.send('Pong!') 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Episode 21/commands/Fun/youtube.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['youtube', 'yt'], // You Can Keep Any Name 3 | description: 'Sends YT Link', // Optional 4 | callback: (message, args) => { 5 | message.channel.send('https://youtube.com/techtipcyber') 6 | } 7 | -------------------------------------------------------------------------------- /Episode 21/commands/Mod/ban.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | 3 | module.exports = { 4 | commands: 'ban', // You Can Keep Any Name 5 | description: 'Bans A User.', // Optional 6 | permissions: 'BAN_MEMBERS', // You Can Keep Any Permissions 7 | permissionError: 'You Dont Have Perms To Ban Someone', 8 | expectedArgs: '+ban @User', // Optional 9 | 10 | callback: (message, args) => { 11 | const member = message.mentions.members.first() 12 | if(!member) return message.reply('You Need To Mention A Member To Ban.') // Mention To Ban. 13 | member.ban() 14 | 15 | const embed = new MessageEmbed() 16 | .setTitle('User Banned') 17 | .setDescription(`<@${member.user.id}> Has Been Banned.`) 18 | .addField('Banned By', message.author) 19 | .setColor('RANDOM') 20 | message.channel.send(embed) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Episode 21/commands/Mod/kick.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | 3 | module.exports = { 4 | commands: 'kick', // You Can Keep Any Name 5 | description: 'Kicks A User.', // Optional 6 | permissions: 'KICK_MEMBERS', // You Can Keep Any Permissions 7 | permissionError: 'You Dont Have Perms To Kick Someone', 8 | expectedArgs: '+Kick @User', // Optional 9 | 10 | callback: (message, args) => { 11 | const member = message.mentions.members.first() 12 | if(!member) return message.reply('You Need To Mention A Member To Kick.') // Mention To Kick. 13 | member.kick() 14 | 15 | const embed = new MessageEmbed() 16 | .setTitle('User Kicked') 17 | .setDescription(`<@${member.user.id}> Has Been Kicked.`) 18 | .addField('Kicked By', message.author) 19 | .setColor('RANDOM') 20 | message.channel.send(embed) 21 | } 22 | } -------------------------------------------------------------------------------- /Episode 21/commands/Mod/purge.js: -------------------------------------------------------------------------------- 1 | module.exports ={ 2 | commands: ['del', 'purge'], // You Can Keep Any Name 3 | permissions: 'ADMINISTRATOR', // You Can Keep Any Permission 4 | permissionError: 'You Cant Use It', 5 | description: 'Deletes Message', //Optional 6 | callback: (message, args) => { 7 | const amount = parseInt(args[0]) + 1; 8 | 9 | if (isNaN(amount)) { 10 | return message.channel.send('Please Enter A Number.') 11 | } else if (amount <= 1 || amount > 100) { 12 | return message.channel.send('You Can Only Delete Messages From 1 To 99.') 13 | } 14 | 15 | message.channel.bulkDelete(amount, true).catch(err => { 16 | console.error(err); 17 | message.channel.send('There Was An Error Deleting Messages In This Cahnnel.') 18 | }) 19 | } 20 | } -------------------------------------------------------------------------------- /Episode 21/commands/load-commands.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | const fs = require('fs') 3 | 4 | module.exports = (client) => { 5 | const baseFile = 'command-base.js' 6 | const commandBase = require(`./${baseFile}`) 7 | 8 | const commands = [] 9 | 10 | const readCommands = (dir) => { 11 | const files = fs.readdirSync(path.join(__dirname, dir)) 12 | for (const file of files) { 13 | const stat = fs.lstatSync(path.join(__dirname, dir, file)) 14 | if (stat.isDirectory()) { 15 | readCommands(path.join(dir, file)) 16 | } else if (file !== baseFile && file !== 'load-commands.js') { 17 | const option = require(path.join(__dirname, dir, file)) 18 | commands.push(option) 19 | if (client) { 20 | commandBase(client, option) 21 | } 22 | } 23 | } 24 | } 25 | 26 | readCommands('.') // To Read All Commands of 'commands' Folder 27 | 28 | return commands 29 | } 30 | -------------------------------------------------------------------------------- /Episode 21/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "token": "Your-Token", 3 | "prefix": "+" 4 | } 5 | -------------------------------------------------------------------------------- /Episode 21/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tutorial-bot", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "TTC", 10 | "license": "ISC", 11 | "dependencies": { 12 | "@discordjs/opus": "^0.3.3", 13 | "@distube/ytpl": "^1.0.10", 14 | "discord.js": "^12.5.1", 15 | "ffmpeg": "0.0.4", 16 | "ffmpeg-static": "^4.2.7", 17 | "moment": "^2.29.1", 18 | "ms": "^2.1.3", 19 | "node-fetch": "^2.6.1", 20 | "node-opus": "^0.3.3", 21 | "opusscript": "0.0.7", 22 | "youtube-sr": "^2.0.5", 23 | "ytdl-core": "^4.0.5" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Episode 22/commands/Fun/ping.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['p', 'ping'], // You Can Keep Any Name 3 | description: 'Smple Ping Command', //Optional 4 | callback: (message, args) => { 5 | message.channel.send('Pong!') 6 | } 7 | } -------------------------------------------------------------------------------- /Episode 22/commands/Fun/youtube.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['youtube', 'yt'], // You Can Keep Any Name 3 | description: 'Sends YT Link', // Optional 4 | callback: (message, args) => { 5 | message.channel.send('https://youtube.com/techtipcyber') 6 | } 7 | } -------------------------------------------------------------------------------- /Episode 22/commands/Mod/ban.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | 3 | module.exports = { 4 | commands: 'ban', // You Can Keep Any Name 5 | description: 'Bans A User.', // Optional 6 | permissions: 'BAN_MEMBERS', // You Can Keep Any Permissions 7 | permissionError: 'You Dont Have Perms To Ban Someone', 8 | expectedArgs: '+ban @User', // Optional 9 | 10 | callback: (message, args) => { 11 | const member = message.mentions.members.first() 12 | if(!member) return message.reply('You Need To Mention A Member To Ban.') // Mention To Ban. 13 | member.ban() 14 | 15 | const embed = new MessageEmbed() 16 | .setTitle('User Banned') 17 | .setDescription(`<@${member.user.id}> Has Been Banned.`) 18 | .addField('Banned By', message.author) 19 | .setColor('RANDOM') 20 | message.channel.send(embed) 21 | } 22 | } -------------------------------------------------------------------------------- /Episode 22/commands/Mod/kick.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | 3 | module.exports = { 4 | commands: 'kick', // You Can Keep Any Name 5 | description: 'Kicks A User.', // Optional 6 | permissions: 'KICK_MEMBERS', // You Can Keep Any Permissions 7 | permissionError: 'You Dont Have Perms To Kick Someone', 8 | expectedArgs: '+Kick @User', // Optional 9 | 10 | callback: (message, args) => { 11 | const member = message.mentions.members.first() 12 | if(!member) return message.reply('You Need To Mention A Member To Kick.') // Mention To Kick. 13 | member.kick() 14 | 15 | const embed = new MessageEmbed() 16 | .setTitle('User Kicked') 17 | .setDescription(`<@${member.user.id}> Has Been Kicked.`) 18 | .addField('Kicked By', message.author) 19 | .setColor('RANDOM') 20 | message.channel.send(embed) 21 | } 22 | } -------------------------------------------------------------------------------- /Episode 22/commands/Mod/purge.js: -------------------------------------------------------------------------------- 1 | module.exports ={ 2 | commands: ['del', 'purge'], // You Can Keep Any Name 3 | permissions: 'ADMINISTRATOR', // You Can Keep Any Permission 4 | permissionError: 'You Cant Use It', 5 | description: 'Deletes Message', //Optional 6 | callback: (message, args) => { 7 | const amount = parseInt(args[0]) + 1; 8 | 9 | if (isNaN(amount)) { 10 | return message.channel.send('Please Enter A Number.') 11 | } else if (amount <= 1 || amount > 100) { 12 | return message.channel.send('You Can Only Delete Messages From 1 To 99.') 13 | } 14 | 15 | message.channel.bulkDelete(amount, true).catch(err => { 16 | console.error(err); 17 | message.channel.send('There Was An Error Deleting Messages In This Cahnnel.') 18 | }) 19 | } 20 | } -------------------------------------------------------------------------------- /Episode 22/commands/Ticket/close.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['close-ticket', 'ct'], // You Can Keep Any Name 3 | permissions: 'MANAGE_CHANNELS', // You Can Keep Any Permission 4 | permissionError: 'You Cant Use This Command', // Optional 5 | description: 'Close A Opened Ticket', // Optional 6 | 7 | callback: (message, args) => { 8 | if(!message.channel.name.includes('ticket')) return message.reply('You Cant Delete A Normal Channel.') // If Non Ticket Channel Is Tried To Delete 9 | message.channel.delete() 10 | } 11 | } -------------------------------------------------------------------------------- /Episode 22/commands/load-commands.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | const fs = require('fs') 3 | 4 | module.exports = (client) => { 5 | const baseFile = 'command-base.js' 6 | const commandBase = require(`./${baseFile}`) 7 | 8 | const commands = [] 9 | 10 | const readCommands = (dir) => { 11 | const files = fs.readdirSync(path.join(__dirname, dir)) 12 | for (const file of files) { 13 | const stat = fs.lstatSync(path.join(__dirname, dir, file)) 14 | if (stat.isDirectory()) { 15 | readCommands(path.join(dir, file)) 16 | } else if (file !== baseFile && file !== 'load-commands.js') { 17 | const option = require(path.join(__dirname, dir, file)) 18 | commands.push(option) 19 | if (client) { 20 | commandBase(client, option) 21 | } 22 | } 23 | } 24 | } 25 | 26 | readCommands('.') // To Read All Commands of 'commands' Folder 27 | 28 | return commands 29 | } 30 | -------------------------------------------------------------------------------- /Episode 22/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "token": "Your-Token", 3 | "prefix": "+" 4 | } 5 | -------------------------------------------------------------------------------- /Episode 22/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tutorial-bot", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "TTC", 10 | "license": "ISC", 11 | "dependencies": { 12 | "@discordjs/opus": "^0.3.3", 13 | "@distube/ytpl": "^1.0.10", 14 | "discord.js": "^12.5.1", 15 | "ffmpeg": "0.0.4", 16 | "ffmpeg-static": "^4.2.7", 17 | "moment": "^2.29.1", 18 | "ms": "^2.1.3", 19 | "node-fetch": "^2.6.1", 20 | "node-opus": "^0.3.3", 21 | "opusscript": "0.0.7", 22 | "youtube-sr": "^2.0.5", 23 | "ytdl-core": "^4.0.5" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Episode 23/commands/Fun/ping.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['p', 'ping'], // You Can Keep Any Name 3 | description: 'Smple Ping Command', //Optional 4 | callback: (message, args) => { 5 | message.channel.send('Pong!') 6 | } 7 | } -------------------------------------------------------------------------------- /Episode 23/commands/Fun/youtube.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['youtube', 'yt'], // You Can Keep Any Name 3 | description: 'Sends YT Link', // Optional 4 | callback: (message, args) => { 5 | message.channel.send('https://youtube.com/techtipcyber') 6 | } 7 | } -------------------------------------------------------------------------------- /Episode 23/commands/Mod/ban.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | 3 | module.exports = { 4 | commands: 'ban', // You Can Keep Any Name 5 | description: 'Bans A User.', // Optional 6 | permissions: 'BAN_MEMBERS', // You Can Keep Any Permissions 7 | permissionError: 'You Dont Have Perms To Ban Someone', 8 | expectedArgs: '+ban @User', // Optional 9 | 10 | callback: (message, args) => { 11 | const member = message.mentions.members.first() 12 | if(!member) return message.reply('You Need To Mention A Member To Ban.') // Mention To Ban. 13 | member.ban() 14 | 15 | const embed = new MessageEmbed() 16 | .setTitle('User Banned') 17 | .setDescription(`<@${member.user.id}> Has Been Banned.`) 18 | .addField('Banned By', message.author) 19 | .setColor('RANDOM') 20 | message.channel.send(embed) 21 | } 22 | } -------------------------------------------------------------------------------- /Episode 23/commands/Mod/kick.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | 3 | module.exports = { 4 | commands: 'kick', // You Can Keep Any Name 5 | description: 'Kicks A User.', // Optional 6 | permissions: 'KICK_MEMBERS', // You Can Keep Any Permissions 7 | permissionError: 'You Dont Have Perms To Kick Someone', 8 | expectedArgs: '+Kick @User', // Optional 9 | 10 | callback: (message, args) => { 11 | const member = message.mentions.members.first() 12 | if(!member) return message.reply('You Need To Mention A Member To Kick.') // Mention To Kick. 13 | member.kick() 14 | 15 | const embed = new MessageEmbed() 16 | .setTitle('User Kicked') 17 | .setDescription(`<@${member.user.id}> Has Been Kicked.`) 18 | .addField('Kicked By', message.author) 19 | .setColor('RANDOM') 20 | message.channel.send(embed) 21 | } 22 | } -------------------------------------------------------------------------------- /Episode 23/commands/Mod/member-count.js: -------------------------------------------------------------------------------- 1 | module.exports = (client) => { 2 | const membercountchannel = '811119579580465182' // Channel Where You Want To Display Member Count // VC Recommended 3 | 4 | const updateMembers = (guild) => { 5 | const channel = guild.channels.cache.get(membercountchannel) 6 | channel.setName(`Member:- ${guild.memberCount.toLocaleString()}`) // Set Channel Name 7 | } 8 | //Updating Member Count WhenEver A User Joins Or Leave 9 | client.on('guildMemberAdd', (member) => updateMembers(member.guild)) // Update Member's Count When SomeOne Joins 10 | client.on('guildMemberRemove', (member) => updateMembers(member.guild)) // Update Member's Count When SomeOne Leaves 11 | 12 | const guild = client.guilds.cache.get('787083837833871400') // Server ID 13 | updateMembers(guild) 14 | } 15 | -------------------------------------------------------------------------------- /Episode 23/commands/Mod/purge.js: -------------------------------------------------------------------------------- 1 | module.exports ={ 2 | commands: ['del', 'purge'], // You Can Keep Any Name 3 | permissions: 'ADMINISTRATOR', // You Can Keep Any Permission 4 | permissionError: 'You Cant Use It', 5 | description: 'Deletes Message', //Optional 6 | callback: (message, args) => { 7 | const amount = parseInt(args[0]) + 1; 8 | 9 | if (isNaN(amount)) { 10 | return message.channel.send('Please Enter A Number.') 11 | } else if (amount <= 1 || amount > 100) { 12 | return message.channel.send('You Can Only Delete Messages From 1 To 99.') 13 | } 14 | 15 | message.channel.bulkDelete(amount, true).catch(err => { 16 | console.error(err); 17 | message.channel.send('There Was An Error Deleting Messages In This Cahnnel.') 18 | }) 19 | } 20 | } -------------------------------------------------------------------------------- /Episode 23/commands/Ticket/close.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['close-ticket', 'ct'], // You Can Keep Any Name 3 | permissions: 'MANAGE_CHANNELS', // You Can Keep Any Permission 4 | permissionError: 'You Cant Use This Command', // Optional 5 | description: 'Close A Opened Ticket', // Optional 6 | 7 | callback: (message, args) => { 8 | if(!message.channel.name.includes('ticket')) return message.reply('You Cant Delete A Normal Channel.') // If Non Ticket Channel Is Tried To Delete 9 | message.channel.delete() 10 | } 11 | } -------------------------------------------------------------------------------- /Episode 23/commands/load-commands.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | const fs = require('fs') 3 | 4 | module.exports = (client) => { 5 | const baseFile = 'command-base.js' 6 | const commandBase = require(`./${baseFile}`) 7 | 8 | const commands = [] 9 | 10 | const readCommands = (dir) => { 11 | const files = fs.readdirSync(path.join(__dirname, dir)) 12 | for (const file of files) { 13 | const stat = fs.lstatSync(path.join(__dirname, dir, file)) 14 | if (stat.isDirectory()) { 15 | readCommands(path.join(dir, file)) 16 | } else if (file !== baseFile && file !== 'load-commands.js') { 17 | const option = require(path.join(__dirname, dir, file)) 18 | commands.push(option) 19 | if (client) { 20 | commandBase(client, option) 21 | } 22 | } 23 | } 24 | } 25 | 26 | readCommands('.') // To Read All Commands of 'commands' Folder 27 | 28 | return commands 29 | } 30 | -------------------------------------------------------------------------------- /Episode 23/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "token": "Your-Token", 3 | "prefix": "+" 4 | } 5 | -------------------------------------------------------------------------------- /Episode 23/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tutorial-bot", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "TTC", 10 | "license": "ISC", 11 | "dependencies": { 12 | "@discordjs/opus": "^0.3.3", 13 | "@distube/ytpl": "^1.0.10", 14 | "discord.js": "^12.5.1", 15 | "ffmpeg": "0.0.4", 16 | "ffmpeg-static": "^4.2.7", 17 | "moment": "^2.29.1", 18 | "ms": "^2.1.3", 19 | "node-fetch": "^2.6.1", 20 | "node-opus": "^0.3.3", 21 | "opusscript": "0.0.7", 22 | "youtube-sr": "^2.0.5", 23 | "ytdl-core": "^4.0.5" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Episode 24/commands/Fun/ping.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['p', 'ping'], // You Can Keep Any Name 3 | description: 'Smple Ping Command', //Optional 4 | callback: (message, args) => { 5 | message.channel.send('Pong!') 6 | } 7 | } -------------------------------------------------------------------------------- /Episode 24/commands/Fun/youtube.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['youtube', 'yt'], // You Can Keep Any Name 3 | description: 'Sends YT Link', // Optional 4 | callback: (message, args) => { 5 | message.channel.send('https://youtube.com/techtipcyber') 6 | } 7 | } -------------------------------------------------------------------------------- /Episode 24/commands/Mod/ban.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | 3 | module.exports = { 4 | commands: 'ban', // You Can Keep Any Name 5 | description: 'Bans A User.', // Optional 6 | permissions: 'BAN_MEMBERS', // You Can Keep Any Permissions 7 | permissionError: 'You Dont Have Perms To Ban Someone', 8 | expectedArgs: '+ban @User', // Optional 9 | 10 | callback: (message, args) => { 11 | const member = message.mentions.members.first() 12 | if(!member) return message.reply('You Need To Mention A Member To Ban.') // Mention To Ban. 13 | member.ban() 14 | 15 | const embed = new MessageEmbed() 16 | .setTitle('User Banned') 17 | .setDescription(`<@${member.user.id}> Has Been Banned.`) 18 | .addField('Banned By', message.author) 19 | .setColor('RANDOM') 20 | message.channel.send(embed) 21 | } 22 | } -------------------------------------------------------------------------------- /Episode 24/commands/Mod/kick.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | 3 | module.exports = { 4 | commands: 'kick', // You Can Keep Any Name 5 | description: 'Kicks A User.', // Optional 6 | permissions: 'KICK_MEMBERS', // You Can Keep Any Permissions 7 | permissionError: 'You Dont Have Perms To Kick Someone', 8 | expectedArgs: '+Kick @User', // Optional 9 | 10 | callback: (message, args) => { 11 | const member = message.mentions.members.first() 12 | if(!member) return message.reply('You Need To Mention A Member To Kick.') // Mention To Kick. 13 | member.kick() 14 | 15 | const embed = new MessageEmbed() 16 | .setTitle('User Kicked') 17 | .setDescription(`<@${member.user.id}> Has Been Kicked.`) 18 | .addField('Kicked By', message.author) 19 | .setColor('RANDOM') 20 | message.channel.send(embed) 21 | } 22 | } -------------------------------------------------------------------------------- /Episode 24/commands/Mod/member-count.js: -------------------------------------------------------------------------------- 1 | module.exports = (client) => { 2 | const membercountchannel = '811119579580465182' // Channel Where You Want To Display Member COunt 3 | 4 | const updateMembers = (guild) => { 5 | const channel = guild.channels.cache.get(membercountchannel) 6 | channel.setName(`Member:- ${guild.memberCount.toLocaleString()}`) // Set Channel Name 7 | } 8 | //Updating Member Count WhenEver A User Joins Or Leave 9 | client.on('guildMemberAdd', (member) => updateMembers(member.guild)) 10 | client.on('guildMemberRemove', (member) => updateMembers(member.guild)) 11 | 12 | const guild = client.guilds.cache.get('787083837833871400') // Server ID 13 | updateMembers(guild) 14 | } -------------------------------------------------------------------------------- /Episode 24/commands/Mod/purge.js: -------------------------------------------------------------------------------- 1 | module.exports ={ 2 | commands: ['del', 'purge'], // You Can Keep Any Name 3 | permissions: 'ADMINISTRATOR', // You Can Keep Any Permission 4 | permissionError: 'You Cant Use It', 5 | description: 'Deletes Message', //Optional 6 | callback: (message, args) => { 7 | const amount = parseInt(args[0]) + 1; 8 | 9 | if (isNaN(amount)) { 10 | return message.channel.send('Please Enter A Number.') 11 | } else if (amount <= 1 || amount > 100) { 12 | return message.channel.send('You Can Only Delete Messages From 1 To 99.') 13 | } 14 | 15 | message.channel.bulkDelete(amount, true).catch(err => { 16 | console.error(err); 17 | message.channel.send('There Was An Error Deleting Messages In This Cahnnel.') 18 | }) 19 | } 20 | } -------------------------------------------------------------------------------- /Episode 24/commands/Reaction-Roles/setup.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | const EditMessage = require('../../utils/EditMessage') // For Editing Text or Adding Emojis 3 | 4 | module.exports = (client) => { 5 | EditMessage(client, '811316961400193074', new MessageEmbed() // Your Channel ID 6 | .setTitle('Reaction Roles') 7 | .setColor('RED') 8 | .setDescription(`**React** 9 | <:Yt:806408246733832232> React With To Get YouTube Role 10 | <:GitHub:811297109953347595> React With To Get GitHub Role 11 | <:VS:811297141669888040> React With To Get Visual Studio Role 12 | <:WikiPedia:811297151069323274> React With To Get WikiPedia Role 13 | `) 14 | .setFooter('Reaction Roles') 15 | , ['<:Yt:806408246733832232>', '<:GitHub:811297109953347595>', '<:VS:811297141669888040>', '<:WikiPedia:811297151069323274>'] // Your Emojis 16 | ) 17 | } 18 | -------------------------------------------------------------------------------- /Episode 24/commands/Ticket/close.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['close-ticket', 'ct'], // You Can Keep Any Name 3 | permissions: 'MANAGE_CHANNELS', // You Can Keep Any Permission 4 | permissionError: 'You Cant Use This Command', // Optional 5 | description: 'Close A Opened Ticket', // Optional 6 | 7 | callback: (message, args) => { 8 | if(!message.channel.name.includes('ticket')) return message.reply('You Cant Delete A Normal Channel.') // If Non Ticket Channel Is Tried To Delete 9 | message.channel.delete() 10 | } 11 | } -------------------------------------------------------------------------------- /Episode 24/commands/load-commands.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | const fs = require('fs') 3 | 4 | module.exports = (client) => { 5 | const baseFile = 'command-base.js' 6 | const commandBase = require(`./${baseFile}`) 7 | 8 | const commands = [] 9 | 10 | const readCommands = (dir) => { 11 | const files = fs.readdirSync(path.join(__dirname, dir)) 12 | for (const file of files) { 13 | const stat = fs.lstatSync(path.join(__dirname, dir, file)) 14 | if (stat.isDirectory()) { 15 | readCommands(path.join(dir, file)) 16 | } else if (file !== baseFile && file !== 'load-commands.js') { 17 | const option = require(path.join(__dirname, dir, file)) 18 | commands.push(option) 19 | if (client) { 20 | commandBase(client, option) 21 | } 22 | } 23 | } 24 | } 25 | 26 | readCommands('.') // To Read All Commands of 'commands' Folder 27 | 28 | return commands 29 | } 30 | -------------------------------------------------------------------------------- /Episode 24/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "token": "Your-Token", 3 | "prefix": "+" 4 | } 5 | -------------------------------------------------------------------------------- /Episode 24/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tutorial-bot", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "TTC", 10 | "license": "ISC", 11 | "dependencies": { 12 | "@discordjs/opus": "^0.3.3", 13 | "@distube/ytpl": "^1.0.10", 14 | "discord.js": "^12.5.1", 15 | "ffmpeg": "0.0.4", 16 | "ffmpeg-static": "^4.2.7", 17 | "moment": "^2.29.1", 18 | "ms": "^2.1.3", 19 | "node-fetch": "^2.6.1", 20 | "node-opus": "^0.3.3", 21 | "opusscript": "0.0.7", 22 | "youtube-sr": "^2.0.5", 23 | "ytdl-core": "^4.0.5" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Episode 25/commands/Fun/ping.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['p', 'ping'], // You Can Keep Any Name 3 | description: 'Smple Ping Command', //Optional 4 | callback: (message, args) => { 5 | message.channel.send('Pong!') 6 | } 7 | } -------------------------------------------------------------------------------- /Episode 25/commands/Fun/youtube.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['youtube', 'yt'], // You Can Keep Any Name 3 | description: 'Sends YT Link', // Optional 4 | callback: (message, args) => { 5 | message.channel.send('https://youtube.com/techtipcyber') 6 | } 7 | } -------------------------------------------------------------------------------- /Episode 25/commands/Mod/ban.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | 3 | module.exports = { 4 | commands: 'ban', // You Can Keep Any Name 5 | description: 'Bans A User.', // Optional 6 | permissions: 'BAN_MEMBERS', // You Can Keep Any Permissions 7 | permissionError: 'You Dont Have Perms To Ban Someone', // Optional 8 | expectedArgs: '+ban @User', // Optional 9 | 10 | callback: (message, args) => { 11 | const member = message.mentions.members.first() 12 | if(!member) return message.reply('You Need To Mention A Member To Ban.') // Mention To Ban. 13 | member.ban() 14 | 15 | const embed = new MessageEmbed() 16 | .setTitle('User Banned') 17 | .setDescription(`<@${member.user.id}> Has Been Banned.`) 18 | .addField('Banned By', message.author) 19 | .setColor('RANDOM') 20 | message.channel.send(embed) 21 | } 22 | } -------------------------------------------------------------------------------- /Episode 25/commands/Mod/kick.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | 3 | module.exports = { 4 | commands: 'kick', // You Can Keep Any Name 5 | description: 'Kicks A User.', // Optional 6 | permissions: 'KICK_MEMBERS', // You Can Keep Any Permissions 7 | permissionError: 'You Dont Have Perms To Kick Someone', 8 | expectedArgs: '+Kick @User', // Optional 9 | 10 | callback: (message, args) => { 11 | const member = message.mentions.members.first() 12 | if(!member) return message.reply('You Need To Mention A Member To Kick.') // Mention To Kick. 13 | member.kick() 14 | 15 | const embed = new MessageEmbed() 16 | .setTitle('User Kicked') 17 | .setDescription(`<@${member.user.id}> Has Been Kicked.`) 18 | .addField('Kicked By', message.author) 19 | .setColor('RANDOM') 20 | message.channel.send(embed) 21 | } 22 | } -------------------------------------------------------------------------------- /Episode 25/commands/Mod/member-count.js: -------------------------------------------------------------------------------- 1 | module.exports = (client) => { 2 | const membercountchannel = '811119579580465182' // Channel Where You Want To Display Member COunt 3 | 4 | const updateMembers = (guild) => { 5 | const channel = guild.channels.cache.get(membercountchannel) 6 | channel.setName(`Member:- ${guild.memberCount.toLocaleString()}`) // Set Channel Name 7 | } 8 | //Updating Member Count WhenEver A User Joins Or Leave 9 | client.on('guildMemberAdd', (member) => updateMembers(member.guild)) 10 | client.on('guildMemberRemove', (member) => updateMembers(member.guild)) 11 | 12 | const guild = client.guilds.cache.get('787083837833871400') // Server ID 13 | updateMembers(guild) 14 | } -------------------------------------------------------------------------------- /Episode 25/commands/Mod/purge.js: -------------------------------------------------------------------------------- 1 | module.exports ={ 2 | commands: ['del', 'purge'], // You Can Keep Any Name 3 | permissions: 'ADMINISTRATOR', // You Can Keep Any Permission 4 | permissionError: 'You Cant Use It', 5 | description: 'Deletes Message', //Optional 6 | callback: (message, args) => { 7 | const amount = parseInt(args[0]) + 1; 8 | 9 | if (isNaN(amount)) { 10 | return message.channel.send('Please Enter A Number.') 11 | } else if (amount <= 1 || amount > 100) { 12 | return message.channel.send('You Can Only Delete Messages From 1 To 99.') 13 | } 14 | 15 | message.channel.bulkDelete(amount, true).catch(err => { 16 | console.error(err); 17 | message.channel.send('There Was An Error Deleting Messages In This Cahnnel.') 18 | }) 19 | } 20 | } -------------------------------------------------------------------------------- /Episode 25/commands/Reaction-Roles/setup.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | const EditMessage = require('../../utils/EditMessage') 3 | 4 | module.exports = (client) => { 5 | EditMessage(client, '811316961400193074', new MessageEmbed() 6 | .setTitle('Reaction Roles') 7 | .setColor('RED') 8 | .setDescription(`**React** 9 | <:Yt:806408246733832232> React With To Get YouTube Role 10 | <:GitHub:811297109953347595> React With To Get GitHub Role 11 | <:VS:811297141669888040> React With To Get Visual Studio Role 12 | <:WikiPedia:811297151069323274> React With To Get WikiPedia Role 13 | `) 14 | .setFooter('Reaction Roles') 15 | , ['<:Yt:806408246733832232>', '<:GitHub:811297109953347595>', '<:VS:811297141669888040>', '<:WikiPedia:811297151069323274>'] 16 | ) 17 | } -------------------------------------------------------------------------------- /Episode 25/commands/Ticket/close.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['close-ticket', 'ct'], // You Can Keep Any Name 3 | permissions: 'MANAGE_CHANNELS', // You Can Keep Any Permission 4 | permissionError: 'You Cant Use This Command', // Optional 5 | description: 'Close A Opened Ticket', // Optional 6 | 7 | callback: (message, args) => { 8 | if(!message.channel.name.includes('ticket')) return message.reply('You Cant Delete A Normal Channel.') // If Non Ticket Channel Is Tried To Delete 9 | message.channel.delete() 10 | } 11 | } -------------------------------------------------------------------------------- /Episode 25/commands/load-commands.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | const fs = require('fs') 3 | 4 | module.exports = (client) => { 5 | const baseFile = 'command-base.js' 6 | const commandBase = require(`./${baseFile}`) 7 | 8 | const commands = [] 9 | 10 | const readCommands = (dir) => { 11 | const files = fs.readdirSync(path.join(__dirname, dir)) 12 | for (const file of files) { 13 | const stat = fs.lstatSync(path.join(__dirname, dir, file)) 14 | if (stat.isDirectory()) { 15 | readCommands(path.join(dir, file)) 16 | } else if (file !== baseFile && file !== 'load-commands.js') { 17 | const option = require(path.join(__dirname, dir, file)) 18 | commands.push(option) 19 | if (client) { 20 | commandBase(client, option) 21 | } 22 | } 23 | } 24 | } 25 | 26 | readCommands('.') 27 | 28 | return commands 29 | } -------------------------------------------------------------------------------- /Episode 25/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "token": "Your-Token", 3 | "prefix": "+" 4 | } 5 | -------------------------------------------------------------------------------- /Episode 25/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tutorial-bot", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "TTC", 10 | "license": "ISC", 11 | "dependencies": { 12 | "@discordjs/opus": "^0.3.3", 13 | "@distube/ytpl": "^1.0.10", 14 | "discord.js": "^12.5.1", 15 | "ffmpeg": "0.0.4", 16 | "ffmpeg-static": "^4.2.7", 17 | "moment": "^2.29.1", 18 | "ms": "^2.1.3", 19 | "node-fetch": "^2.6.1", 20 | "node-opus": "^0.3.3", 21 | "opusscript": "0.0.7", 22 | "youtube-sr": "^2.0.5", 23 | "ytdl-core": "^4.0.5" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Episode 26/commands/Fun/ping.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['p', 'ping'], // You Can Keep Any Name 3 | description: 'Smple Ping Command', //Optional 4 | callback: (message, args) => { 5 | message.channel.send('Pong!') 6 | } 7 | } -------------------------------------------------------------------------------- /Episode 26/commands/Fun/youtube.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['youtube', 'yt'], // You Can Keep Any Name 3 | description: 'Sends YT Link', // Optional 4 | callback: (message, args) => { 5 | message.channel.send('https://youtube.com/techtipcyber') 6 | } 7 | } -------------------------------------------------------------------------------- /Episode 26/commands/Mod/ban.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | 3 | module.exports = { 4 | commands: 'ban', // You Can Keep Any Name 5 | description: 'Bans A User.', // Optional 6 | permissions: 'BAN_MEMBERS', // You Can Keep Any Permissions 7 | permissionError: 'You Dont Have Perms To Ban Someone', // Optional 8 | expectedArgs: '+ban @User', // Optional 9 | 10 | callback: (message, args) => { 11 | const member = message.mentions.members.first() 12 | if(!member) return message.reply('You Need To Mention A Member To Ban.') // Mention To Ban. 13 | member.ban() 14 | 15 | const embed = new MessageEmbed() 16 | .setTitle('User Banned') 17 | .setDescription(`<@${member.user.id}> Has Been Banned.`) 18 | .addField('Banned By', message.author) 19 | .setColor('RANDOM') 20 | message.channel.send(embed) 21 | } 22 | } -------------------------------------------------------------------------------- /Episode 26/commands/Mod/kick.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | 3 | module.exports = { 4 | commands: 'kick', // You Can Keep Any Name 5 | description: 'Kicks A User.', // Optional 6 | permissions: 'KICK_MEMBERS', // You Can Keep Any Permissions 7 | permissionError: 'You Dont Have Perms To Kick Someone', 8 | expectedArgs: '+Kick @User', // Optional 9 | 10 | callback: (message, args) => { 11 | const member = message.mentions.members.first() 12 | if(!member) return message.reply('You Need To Mention A Member To Kick.') // Mention To Kick. 13 | member.kick() 14 | 15 | const embed = new MessageEmbed() 16 | .setTitle('User Kicked') 17 | .setDescription(`<@${member.user.id}> Has Been Kicked.`) 18 | .addField('Kicked By', message.author) 19 | .setColor('RANDOM') 20 | message.channel.send(embed) 21 | } 22 | } -------------------------------------------------------------------------------- /Episode 26/commands/Mod/member-count.js: -------------------------------------------------------------------------------- 1 | module.exports = (client) => { 2 | const membercountchannel = '811119579580465182' // Channel Where You Want To Display Member COunt 3 | 4 | const updateMembers = (guild) => { 5 | const channel = guild.channels.cache.get(membercountchannel) 6 | channel.setName(`Member:- ${guild.memberCount.toLocaleString()}`) // Set Channel Name 7 | } 8 | //Updating Member Count WhenEver A User Joins Or Leave 9 | client.on('guildMemberAdd', (member) => updateMembers(member.guild)) 10 | client.on('guildMemberRemove', (member) => updateMembers(member.guild)) 11 | 12 | const guild = client.guilds.cache.get('787083837833871400') // Server ID 13 | updateMembers(guild) 14 | } -------------------------------------------------------------------------------- /Episode 26/commands/Mod/purge.js: -------------------------------------------------------------------------------- 1 | module.exports ={ 2 | commands: ['del', 'purge'], // You Can Keep Any Name 3 | permissions: 'ADMINISTRATOR', // You Can Keep Any Permission 4 | permissionError: 'You Cant Use It', 5 | description: 'Deletes Message', //Optional 6 | callback: (message, args) => { 7 | const amount = parseInt(args[0]) + 1; 8 | 9 | if (isNaN(amount)) { 10 | return message.channel.send('Please Enter A Number.') 11 | } else if (amount <= 1 || amount > 100) { 12 | return message.channel.send('You Can Only Delete Messages From 1 To 99.') 13 | } 14 | 15 | message.channel.bulkDelete(amount, true).catch(err => { 16 | console.error(err); 17 | message.channel.send('There Was An Error Deleting Messages In This Cahnnel.') 18 | }) 19 | } 20 | } -------------------------------------------------------------------------------- /Episode 26/commands/Reaction-Roles/setup.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | const EditMessage = require('../../utils/EditMessage') 3 | 4 | module.exports = (client) => { 5 | EditMessage(client, '811316961400193074', new MessageEmbed() 6 | .setTitle('Reaction Roles') 7 | .setColor('RED') 8 | .setDescription(`**React** 9 | <:Yt:806408246733832232> React With To Get YouTube Role 10 | <:GitHub:811297109953347595> React With To Get GitHub Role 11 | <:VS:811297141669888040> React With To Get Visual Studio Role 12 | <:WikiPedia:811297151069323274> React With To Get WikiPedia Role 13 | `) 14 | .setFooter('Reaction Roles') 15 | , ['<:Yt:806408246733832232>', '<:GitHub:811297109953347595>', '<:VS:811297141669888040>', '<:WikiPedia:811297151069323274>'] 16 | ) 17 | } -------------------------------------------------------------------------------- /Episode 26/commands/Ticket/close.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['close-ticket', 'ct'], // You Can Keep Any Name 3 | permissions: 'MANAGE_CHANNELS', // You Can Keep Any Permission 4 | permissionError: 'You Cant Use This Command', // Optional 5 | description: 'Close A Opened Ticket', // Optional 6 | 7 | callback: (message, args) => { 8 | if(!message.channel.name.includes('ticket')) return message.reply('You Cant Delete A Normal Channel.') // If Non Ticket Channel Is Tried To Delete 9 | message.channel.delete() 10 | } 11 | } -------------------------------------------------------------------------------- /Episode 26/commands/load-commands.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | const fs = require('fs') 3 | 4 | module.exports = (client) => { 5 | const baseFile = 'command-base.js' 6 | const commandBase = require(`./${baseFile}`) 7 | 8 | const commands = [] 9 | 10 | const readCommands = (dir) => { 11 | const files = fs.readdirSync(path.join(__dirname, dir)) 12 | for (const file of files) { 13 | const stat = fs.lstatSync(path.join(__dirname, dir, file)) 14 | if (stat.isDirectory()) { 15 | readCommands(path.join(dir, file)) 16 | } else if (file !== baseFile && file !== 'load-commands.js') { 17 | const option = require(path.join(__dirname, dir, file)) 18 | commands.push(option) 19 | if (client) { 20 | commandBase(client, option) 21 | } 22 | } 23 | } 24 | } 25 | 26 | readCommands('.') 27 | 28 | return commands 29 | } -------------------------------------------------------------------------------- /Episode 26/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "token": "Your-Token", 3 | "prefix": "+" 4 | } 5 | -------------------------------------------------------------------------------- /Episode 26/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tutorial-bot", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "TTC", 10 | "license": "ISC", 11 | "dependencies": { 12 | "@discordjs/opus": "^0.3.3", 13 | "@distube/ytpl": "^1.0.10", 14 | "discord.js": "^12.5.1", 15 | "ffmpeg": "0.0.4", 16 | "ffmpeg-static": "^4.2.7", 17 | "moment": "^2.29.1", 18 | "ms": "^2.1.3", 19 | "node-fetch": "^2.6.1", 20 | "node-opus": "^0.3.3", 21 | "opusscript": "0.0.7", 22 | "parse-ms": "^2.1.0", 23 | "quick.db": "^7.1.3", 24 | "youtube-sr": "^2.0.5", 25 | "ytdl-core": "^4.0.5" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Episode 27/commands/Fun/ping.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['p', 'ping'], // You Can Keep Any Name 3 | description: 'Smple Ping Command', //Optional 4 | callback: (message, args) => { 5 | message.channel.send('Pong!') 6 | } 7 | } -------------------------------------------------------------------------------- /Episode 27/commands/Fun/youtube.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['youtube', 'yt'], // You Can Keep Any Name 3 | description: 'Sends YT Link', // Optional 4 | callback: (message, args) => { 5 | message.channel.send('https://youtube.com/techtipcyber') 6 | } 7 | } -------------------------------------------------------------------------------- /Episode 27/commands/Mod/ban.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | 3 | module.exports = { 4 | commands: 'ban', // You Can Keep Any Name 5 | description: 'Bans A User.', // Optional 6 | permissions: 'BAN_MEMBERS', // You Can Keep Any Permissions 7 | permissionError: 'You Dont Have Perms To Ban Someone', // Optional 8 | expectedArgs: '+ban @User', // Optional 9 | 10 | callback: (message, args) => { 11 | const member = message.mentions.members.first() 12 | if(!member) return message.reply('You Need To Mention A Member To Ban.') // Mention To Ban. 13 | member.ban() 14 | 15 | const embed = new MessageEmbed() 16 | .setTitle('User Banned') 17 | .setDescription(`<@${member.user.id}> Has Been Banned.`) 18 | .addField('Banned By', message.author) 19 | .setColor('RANDOM') 20 | message.channel.send(embed) 21 | } 22 | } -------------------------------------------------------------------------------- /Episode 27/commands/Mod/kick.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | 3 | module.exports = { 4 | commands: 'kick', // You Can Keep Any Name 5 | description: 'Kicks A User.', // Optional 6 | permissions: 'KICK_MEMBERS', // You Can Keep Any Permissions 7 | permissionError: 'You Dont Have Perms To Kick Someone', 8 | expectedArgs: '+Kick @User', // Optional 9 | 10 | callback: (message, args) => { 11 | const member = message.mentions.members.first() 12 | if(!member) return message.reply('You Need To Mention A Member To Kick.') // Mention To Kick. 13 | member.kick() 14 | 15 | const embed = new MessageEmbed() 16 | .setTitle('User Kicked') 17 | .setDescription(`<@${member.user.id}> Has Been Kicked.`) 18 | .addField('Kicked By', message.author) 19 | .setColor('RANDOM') 20 | message.channel.send(embed) 21 | } 22 | } -------------------------------------------------------------------------------- /Episode 27/commands/Mod/member-count.js: -------------------------------------------------------------------------------- 1 | module.exports = (client) => { 2 | const membercountchannel = '811119579580465182' // Channel Where You Want To Display Member COunt 3 | 4 | const updateMembers = (guild) => { 5 | const channel = guild.channels.cache.get(membercountchannel) 6 | channel.setName(`Member:- ${guild.memberCount.toLocaleString()}`) // Set Channel Name 7 | } 8 | //Updating Member Count WhenEver A User Joins Or Leave 9 | client.on('guildMemberAdd', (member) => updateMembers(member.guild)) 10 | client.on('guildMemberRemove', (member) => updateMembers(member.guild)) 11 | 12 | const guild = client.guilds.cache.get('787083837833871400') // Server ID 13 | updateMembers(guild) 14 | } -------------------------------------------------------------------------------- /Episode 27/commands/Mod/purge.js: -------------------------------------------------------------------------------- 1 | module.exports ={ 2 | commands: ['del', 'purge'], // You Can Keep Any Name 3 | permissions: 'ADMINISTRATOR', // You Can Keep Any Permission 4 | permissionError: 'You Cant Use It', 5 | description: 'Deletes Message', //Optional 6 | callback: (message, args) => { 7 | const amount = parseInt(args[0]) + 1; 8 | 9 | if (isNaN(amount)) { 10 | return message.channel.send('Please Enter A Number.') 11 | } else if (amount <= 1 || amount > 100) { 12 | return message.channel.send('You Can Only Delete Messages From 1 To 99.') 13 | } 14 | 15 | message.channel.bulkDelete(amount, true).catch(err => { 16 | console.error(err); 17 | message.channel.send('There Was An Error Deleting Messages In This Cahnnel.') 18 | }) 19 | } 20 | } -------------------------------------------------------------------------------- /Episode 27/commands/Reaction-Roles/setup.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | const EditMessage = require('../../utils/EditMessage') 3 | 4 | module.exports = (client) => { 5 | EditMessage(client, '811316961400193074', new MessageEmbed() 6 | .setTitle('Reaction Roles') 7 | .setColor('RED') 8 | .setDescription(`**React** 9 | <:Yt:806408246733832232> React With To Get YouTube Role 10 | <:GitHub:811297109953347595> React With To Get GitHub Role 11 | <:VS:811297141669888040> React With To Get Visual Studio Role 12 | <:WikiPedia:811297151069323274> React With To Get WikiPedia Role 13 | `) 14 | .setFooter('Reaction Roles') 15 | , ['<:Yt:806408246733832232>', '<:GitHub:811297109953347595>', '<:VS:811297141669888040>', '<:WikiPedia:811297151069323274>'] 16 | ) 17 | } -------------------------------------------------------------------------------- /Episode 27/commands/Ticket/close.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['close-ticket', 'ct'], // You Can Keep Any Name 3 | permissions: 'MANAGE_CHANNELS', // You Can Keep Any Permission 4 | permissionError: 'You Cant Use This Command', // Optional 5 | description: 'Close A Opened Ticket', // Optional 6 | 7 | callback: (message, args) => { 8 | if(!message.channel.name.includes('ticket')) return message.reply('You Cant Delete A Normal Channel.') // If Non Ticket Channel Is Tried To Delete 9 | message.channel.delete() 10 | } 11 | } -------------------------------------------------------------------------------- /Episode 27/commands/load-commands.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | const fs = require('fs') 3 | 4 | module.exports = (client) => { 5 | const baseFile = 'command-base.js' 6 | const commandBase = require(`./${baseFile}`) 7 | 8 | const commands = [] 9 | 10 | const readCommands = (dir) => { 11 | const files = fs.readdirSync(path.join(__dirname, dir)) 12 | for (const file of files) { 13 | const stat = fs.lstatSync(path.join(__dirname, dir, file)) 14 | if (stat.isDirectory()) { 15 | readCommands(path.join(dir, file)) 16 | } else if (file !== baseFile && file !== 'load-commands.js') { 17 | const option = require(path.join(__dirname, dir, file)) 18 | commands.push(option) 19 | if (client) { 20 | commandBase(client, option) 21 | } 22 | } 23 | } 24 | } 25 | 26 | readCommands('.') 27 | 28 | return commands 29 | } 30 | -------------------------------------------------------------------------------- /Episode 27/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "token": "Your-Token", 3 | "prefix": "+" 4 | } 5 | -------------------------------------------------------------------------------- /Episode 27/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tutorial-bot", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "TTC", 10 | "license": "ISC", 11 | "dependencies": { 12 | "@discordjs/opus": "^0.3.3", 13 | "@distube/ytpl": "^1.0.10", 14 | "discord.js": "^12.5.1", 15 | "ffmpeg": "0.0.4", 16 | "ffmpeg-static": "^4.2.7", 17 | "moment": "^2.29.1", 18 | "ms": "^2.1.3", 19 | "node-fetch": "^2.6.1", 20 | "node-opus": "^0.3.3", 21 | "opusscript": "0.0.7", 22 | "parse-ms": "^2.1.0", 23 | "quick.db": "^7.1.3", 24 | "youtube-sr": "^2.0.5", 25 | "ytdl-core": "^4.0.5" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Episode 30/Images/welcome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ubaid7/Discord.JS-V12-Bot-Tutorial/e03815ee33f1b49973d08a00e8c2ecfd204cbf76/Episode 30/Images/welcome.png -------------------------------------------------------------------------------- /Episode 30/commands/Main-Commands/Fun/ping.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['p', 'ping'], // You Can Keep Any Name 3 | description: 'Smple Ping Command', //Optional 4 | callback: (message, args) => { 5 | message.channel.send('Pong!') 6 | } 7 | } -------------------------------------------------------------------------------- /Episode 30/commands/Main-Commands/Fun/youtube.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['youtube', 'yt'], // You Can Keep Any Name 3 | description: 'Sends YT Link', // Optional 4 | callback: (message, args) => { 5 | message.channel.send('https://youtube.com/techtipcyber') 6 | } 7 | } -------------------------------------------------------------------------------- /Episode 30/commands/Main-Commands/Mod/ban.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | 3 | module.exports = { 4 | commands: 'ban', // You Can Keep Any Name 5 | description: 'Bans A User.', // Optional 6 | permissions: 'BAN_MEMBERS', // You Can Keep Any Permissions 7 | permissionError: 'You Dont Have Perms To Ban Someone', // Optional 8 | expectedArgs: '+ban @User', // Optional 9 | 10 | callback: (message, args) => { 11 | const member = message.mentions.members.first() 12 | if(!member) return message.reply('You Need To Mention A Member To Ban.') // Mention To Ban. 13 | member.ban() 14 | 15 | const embed = new MessageEmbed() 16 | .setTitle('User Banned') 17 | .setDescription(`<@${member.user.id}> Has Been Banned.`) 18 | .addField('Banned By', message.author) 19 | .setColor('RANDOM') 20 | message.channel.send(embed) 21 | } 22 | } -------------------------------------------------------------------------------- /Episode 30/commands/Main-Commands/Mod/kick.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | 3 | module.exports = { 4 | commands: 'kick', // You Can Keep Any Name 5 | description: 'Kicks A User.', // Optional 6 | permissions: 'KICK_MEMBERS', // You Can Keep Any Permissions 7 | permissionError: 'You Dont Have Perms To Kick Someone', 8 | expectedArgs: '+Kick @User', // Optional 9 | 10 | callback: (message, args) => { 11 | const member = message.mentions.members.first() 12 | if(!member) return message.reply('You Need To Mention A Member To Kick.') // Mention To Kick. 13 | member.kick() 14 | 15 | const embed = new MessageEmbed() 16 | .setTitle('User Kicked') 17 | .setDescription(`<@${member.user.id}> Has Been Kicked.`) 18 | .addField('Kicked By', message.author) 19 | .setColor('RANDOM') 20 | message.channel.send(embed) 21 | } 22 | } -------------------------------------------------------------------------------- /Episode 30/commands/Main-Commands/Mod/member-count.js: -------------------------------------------------------------------------------- 1 | module.exports = (client) => { 2 | const membercountchannel = '811119579580465182' // Channel Where You Want To Display Member COunt 3 | 4 | const updateMembers = (guild) => { 5 | const channel = guild.channels.cache.get(membercountchannel) 6 | channel.setName(`Member:- ${guild.memberCount.toLocaleString()}`) // Set Channel Name 7 | } 8 | //Updating Member Count WhenEver A User Joins Or Leave 9 | client.on('guildMemberAdd', (member) => updateMembers(member.guild)) 10 | client.on('guildMemberRemove', (member) => updateMembers(member.guild)) 11 | 12 | const guild = client.guilds.cache.get('787083837833871400') // Server ID 13 | updateMembers(guild) 14 | } -------------------------------------------------------------------------------- /Episode 30/commands/Main-Commands/Mod/purge.js: -------------------------------------------------------------------------------- 1 | module.exports ={ 2 | commands: ['del', 'purge'], // You Can Keep Any Name 3 | permissions: 'ADMINISTRATOR', // You Can Keep Any Permission 4 | permissionError: 'You Cant Use It', 5 | description: 'Deletes Message', //Optional 6 | callback: (message, args) => { 7 | const amount = parseInt(args[0]) + 1; 8 | 9 | if (isNaN(amount)) { 10 | return message.channel.send('Please Enter A Number.') 11 | } else if (amount <= 1 || amount > 100) { 12 | return message.channel.send('You Can Only Delete Messages From 1 To 99.') 13 | } 14 | 15 | message.channel.bulkDelete(amount, true).catch(err => { 16 | console.error(err); 17 | message.channel.send('There Was An Error Deleting Messages In This Cahnnel.') 18 | }) 19 | } 20 | } -------------------------------------------------------------------------------- /Episode 30/commands/Main-Commands/Reaction-Roles/setup.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | const EditMessage = require('../../../utils/EditMessage') 3 | 4 | module.exports = (client) => { 5 | EditMessage(client, '811316961400193074', new MessageEmbed() 6 | .setTitle('Reaction Roles') 7 | .setColor('RED') 8 | .setDescription(`**React** 9 | <:Yt:806408246733832232> React With To Get YouTube Role 10 | <:GitHub:811297109953347595> React With To Get GitHub Role 11 | <:VS:811297141669888040> React With To Get Visual Studio Role 12 | <:WikiPedia:811297151069323274> React With To Get WikiPedia Role 13 | `) 14 | .setFooter('Reaction Roles') 15 | , ['<:Yt:806408246733832232>', '<:GitHub:811297109953347595>', '<:VS:811297141669888040>', '<:WikiPedia:811297151069323274>'] 16 | ) 17 | } -------------------------------------------------------------------------------- /Episode 30/commands/Main-Commands/Ticket/close.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['close-ticket', 'ct'], // You Can Keep Any Name 3 | permissions: 'MANAGE_CHANNELS', // You Can Keep Any Permission 4 | permissionError: 'You Cant Use This Command', // Optional 5 | description: 'Close A Opened Ticket', // Optional 6 | 7 | callback: (message, args) => { 8 | if(!message.channel.name.includes('ticket')) return message.reply('You Cant Delete A Normal Channel.') // If Non Ticket Channel Is Tried To Delete 9 | message.channel.delete() 10 | } 11 | } -------------------------------------------------------------------------------- /Episode 30/commands/Per-Server-Commands/Reset/resetcahtbot.js: -------------------------------------------------------------------------------- 1 | const db = require('quick.db') 2 | 3 | module.exports = { 4 | commands: ['resetchatbot', 'reset-chat-bot'], // You Can Keep Any Name 5 | description: 'ReSet Chat Bot Channel', // Optional 6 | permissions: 'MANAGE_CHANNELS', // You Can Keep Any Permission 7 | permissionError: 'You Dont Have Permission To Use This Command', // Optional 8 | 9 | callback: async(message, args, client) => { 10 | 11 | const chatbotchannel = db.fetch(`chatbotchannel_${message.guild.id}`) 12 | if(chatbotchannel === null) return message.reply(`Chat Bot Channel Isnot Set.`) // If Chat Bot Channel Isnot Set 13 | else if(chatbotchannel !== null) { // If Its Set Then... 14 | message.reply(`Chat Bot Channel Removed`) 15 | db.delete(`chatbotchannel_${message.guild.id}`) // Delete Chat Bot Channel 16 | } 17 | 18 | } 19 | } -------------------------------------------------------------------------------- /Episode 30/commands/Per-Server-Commands/Reset/resetprefix.js: -------------------------------------------------------------------------------- 1 | const db = require('quick.db') 2 | 3 | module.exports = { 4 | commands: ['reset-prefix'], // You Can Keep Any Name 5 | description: 'ReSet Prefix For Server', // Optional 6 | permissions: 'MANAGE_GUILD', // You Can Keep Any Permission 7 | permissionError: 'You Dont Have Permission To Use This Command', // Optional 8 | 9 | callback: async(message, args, client) => { 10 | 11 | const prefix = db.fetch(`prefix_${message.guild.id}`) // Get Old Prefix 12 | if(prefix === null) return message.reply('Prefix Not Set For This Server') // If No Prefix Is Set Yet 13 | else if(prefix !== null) { // If Prefix Is Set Then... 14 | message.reply('Prefix Reset To **+**') 15 | db.delete(`prefix_${message.guild.id}`) // Delete Prefix And Set To Default Prefix 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /Episode 30/commands/Per-Server-Commands/Set/setprefix.js: -------------------------------------------------------------------------------- 1 | const db = require('quick.db') 2 | 3 | module.exports = { 4 | commands: ['set-prefix'], // You Can Keep Any Name 5 | description: 'Set Prefix For Server', // Optional 6 | permissions: 'MANAGE_GUILD', // You Can Keep Any Permission 7 | permissionError: 'You Dont Have Permission To Use This Command', // Optional 8 | 9 | callback: async(message, args, client) => { 10 | 11 | const newprefix = args[0] // New Prefix 12 | if(!newprefix) return message.reply('What Prefix Do You Want To Keep As?') // If No Prefix Is Added 13 | else if(newprefix.length > 4) return message.reply('Your Prefix Is Too Long, Chose Shorter(Less Then 4 Character)') // If Prefix Is More Then 4 Character's 14 | else { 15 | message.reply(`Prefix Set As **${newprefix}**`) 16 | db.set(`prefix_${message.guild.id}`, newprefix) // Set New Prefix 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /Episode 30/commands/load-commands.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | const fs = require('fs') 3 | 4 | module.exports = (client) => { 5 | const baseFile = 'command-base.js' 6 | const commandBase = require(`./${baseFile}`) 7 | 8 | const commands = [] 9 | 10 | const readCommands = (dir) => { 11 | const files = fs.readdirSync(path.join(__dirname, dir)) 12 | for (const file of files) { 13 | const stat = fs.lstatSync(path.join(__dirname, dir, file)) 14 | if (stat.isDirectory()) { 15 | readCommands(path.join(dir, file)) 16 | } else if (file !== baseFile && file !== 'load-commands.js') { 17 | const option = require(path.join(__dirname, dir, file)) 18 | commands.push(option) 19 | if (client) { 20 | commandBase(client, option) 21 | } 22 | } 23 | } 24 | } 25 | 26 | readCommands('.') 27 | 28 | return commands 29 | } 30 | -------------------------------------------------------------------------------- /Episode 30/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "token": "Your-Token", 3 | "def_prefix": "+" 4 | } 5 | -------------------------------------------------------------------------------- /Episode 30/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tutorial-bot", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "TTC", 10 | "license": "ISC", 11 | "dependencies": { 12 | "@discordjs/opus": "^0.3.3", 13 | "@distube/ytpl": "^1.0.10", 14 | "canvas": "^2.7.0", 15 | "discord.js": "^12.5.1", 16 | "ffmpeg": "0.0.4", 17 | "ffmpeg-static": "^4.2.7", 18 | "moment": "^2.29.1", 19 | "ms": "^2.1.3", 20 | "node-fetch": "^2.6.1", 21 | "node-opus": "^0.3.3", 22 | "opusscript": "0.0.7", 23 | "parse-ms": "^2.1.0", 24 | "path": "^0.12.7", 25 | "quick.db": "^7.1.3", 26 | "youtube-sr": "^2.0.5", 27 | "ytdl-core": "^4.0.5" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Episode 40/Images/welcome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ubaid7/Discord.JS-V12-Bot-Tutorial/e03815ee33f1b49973d08a00e8c2ecfd204cbf76/Episode 40/Images/welcome.png -------------------------------------------------------------------------------- /Episode 40/commands/Main-Commands/Fun/ping.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['p', 'ping'], // You Can Keep Any Name 3 | description: 'Smple Ping Command', //Optional 4 | callback: (message, args) => { 5 | message.channel.send('Pong!') 6 | } 7 | } -------------------------------------------------------------------------------- /Episode 40/commands/Main-Commands/Fun/youtube.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['youtube', 'yt'], // You Can Keep Any Name 3 | description: 'Sends YT Link', // Optional 4 | callback: (message, args) => { 5 | message.channel.send('https://youtube.com/techtipcyber') 6 | } 7 | } -------------------------------------------------------------------------------- /Episode 40/commands/Main-Commands/Mod/ban.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | 3 | module.exports = { 4 | commands: 'ban', // You Can Keep Any Name 5 | description: 'Bans A User.', // Optional 6 | permissions: 'BAN_MEMBERS', // You Can Keep Any Permissions 7 | permissionError: 'You Dont Have Perms To Ban Someone', // Optional 8 | expectedArgs: '+ban @User', // Optional 9 | 10 | callback: (message, args) => { 11 | const member = message.mentions.members.first() 12 | if(!member) return message.reply('You Need To Mention A Member To Ban.') // Mention To Ban. 13 | member.ban() 14 | 15 | const embed = new MessageEmbed() 16 | .setTitle('User Banned') 17 | .setDescription(`<@${member.user.id}> Has Been Banned.`) 18 | .addField('Banned By', message.author) 19 | .setColor('RANDOM') 20 | message.channel.send(embed) 21 | } 22 | } -------------------------------------------------------------------------------- /Episode 40/commands/Main-Commands/Mod/kick.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | 3 | module.exports = { 4 | commands: 'kick', // You Can Keep Any Name 5 | description: 'Kicks A User.', // Optional 6 | permissions: 'KICK_MEMBERS', // You Can Keep Any Permissions 7 | permissionError: 'You Dont Have Perms To Kick Someone', 8 | expectedArgs: '+Kick @User', // Optional 9 | 10 | callback: (message, args) => { 11 | const member = message.mentions.members.first() 12 | if(!member) return message.reply('You Need To Mention A Member To Kick.') // Mention To Kick. 13 | member.kick() 14 | 15 | const embed = new MessageEmbed() 16 | .setTitle('User Kicked') 17 | .setDescription(`<@${member.user.id}> Has Been Kicked.`) 18 | .addField('Kicked By', message.author) 19 | .setColor('RANDOM') 20 | message.channel.send(embed) 21 | } 22 | } -------------------------------------------------------------------------------- /Episode 40/commands/Main-Commands/Mod/member-count.js: -------------------------------------------------------------------------------- 1 | module.exports = (client) => { 2 | const membercountchannel = '811119579580465182' // Channel Where You Want To Display Member COunt 3 | 4 | const updateMembers = (guild) => { 5 | const channel = guild.channels.cache.get(membercountchannel) 6 | channel.setName(`Member:- ${guild.memberCount.toLocaleString()}`) // Set Channel Name 7 | } 8 | //Updating Member Count WhenEver A User Joins Or Leave 9 | client.on('guildMemberAdd', (member) => updateMembers(member.guild)) 10 | client.on('guildMemberRemove', (member) => updateMembers(member.guild)) 11 | 12 | const guild = client.guilds.cache.get('787083837833871400') // Server ID 13 | updateMembers(guild) 14 | } -------------------------------------------------------------------------------- /Episode 40/commands/Main-Commands/Mod/purge.js: -------------------------------------------------------------------------------- 1 | module.exports ={ 2 | commands: ['del', 'purge'], // You Can Keep Any Name 3 | permissions: 'ADMINISTRATOR', // You Can Keep Any Permission 4 | permissionError: 'You Cant Use It', 5 | description: 'Deletes Message', //Optional 6 | callback: (message, args) => { 7 | const amount = parseInt(args[0]) + 1; 8 | 9 | if (isNaN(amount)) { 10 | return message.channel.send('Please Enter A Number.') 11 | } else if (amount <= 1 || amount > 100) { 12 | return message.channel.send('You Can Only Delete Messages From 1 To 99.') 13 | } 14 | 15 | message.channel.bulkDelete(amount, true).catch(err => { 16 | console.error(err); 17 | message.channel.send('There Was An Error Deleting Messages In This Cahnnel.') 18 | }) 19 | } 20 | } -------------------------------------------------------------------------------- /Episode 40/commands/Main-Commands/Reaction-Roles/setup.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | const EditMessage = require('../../../utils/EditMessage') 3 | 4 | module.exports = (client) => { 5 | EditMessage(client, '811316961400193074', new MessageEmbed() 6 | .setTitle('Reaction Roles') 7 | .setColor('RED') 8 | .setDescription(`**React** 9 | <:Yt:806408246733832232> React With To Get YouTube Role 10 | <:GitHub:811297109953347595> React With To Get GitHub Role 11 | <:VS:811297141669888040> React With To Get Visual Studio Role 12 | <:WikiPedia:811297151069323274> React With To Get WikiPedia Role 13 | `) 14 | .setFooter('Reaction Roles') 15 | , ['<:Yt:806408246733832232>', '<:GitHub:811297109953347595>', '<:VS:811297141669888040>', '<:WikiPedia:811297151069323274>'] 16 | ) 17 | } -------------------------------------------------------------------------------- /Episode 40/commands/Main-Commands/Ticket/Command/close.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['close-ticket', 'ct'], // You Can Keep Any Name 3 | permissions: 'MANAGE_CHANNELS', // You Can Keep Any Permission 4 | permissionError: 'You Cant Use This Command', // Optional 5 | description: 'Close A Opened Ticket', // Optional 6 | 7 | callback: (message, args) => { 8 | if(!message.channel.name.includes('ticket')) return message.reply('You Cant Delete A Normal Channel.') // If Non Ticket Channel Is Tried To Delete 9 | message.channel.delete({ timeout: 5000 }) // Delete Ticket In 5 Seconds 10 | message.channel.send('Deleting Ticket In 5 Seconds') 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Episode 40/commands/Main-Commands/Ticket/Command/lock.js: -------------------------------------------------------------------------------- 1 | const db = require('quick.db') // npm i quick.db 2 | 3 | module.exports = { 4 | commands: ['lock-ticket'], // You Can Keep Any Name 5 | permissions: 'MANAGE_CHANNELS', // You Can Keep Any Permission 6 | permissionError: 'You Cant Use This COmmand', // Optional 7 | description: 'Lock Ticket', // Optional 8 | 9 | callback: (message, args) => { 10 | 11 | if(message.channel.name.includes('ticket')) return // If Channel Isn't Ticket Channel, Won't Work 12 | else { 13 | const memberinticket = db.fetch(`ticket-user_${message.channel.id}`) // Get User In Ticket 14 | message.channel.updateOverwrite(memberinticket, { 15 | SEND_MESSAGES: false 16 | }) // Permission 17 | message.channel.send(`Locked Ticket`) 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Episode 40/commands/Main-Commands/Ticket/Command/transcript.js: -------------------------------------------------------------------------------- 1 | const { MessageAttachment } = require('discord.js') // Importing discord.js Package For Sending As Attachment 2 | const { fetchMessage } = require('tech-tip-cyber') // Importing Package // npm i tech-tip-cyber 3 | 4 | module.exports = { 5 | commands: ['transcrip-ticket', 'ticket-transcrip', 'tt'], // You Can Keep Any Name 6 | description: 'Get Ticket TranScript', // Optional 7 | 8 | callback: (message, args) =>{ 9 | fetchMessage(message, 99).then((data) => { // fetchMessage(message, <10>) It Will Fetch 10 Messages From Channel, Can Be Any Number Less Than 100 10 | const file = new MessageAttachment(data, "fetched.html"); // Making Attachment File 11 | message.channel.send(file); // Send As Attachment 12 | message.channel.send('Download And Open File To See Messages'); 13 | }); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Episode 40/commands/Main-Commands/Ticket/Command/unlock.js: -------------------------------------------------------------------------------- 1 | const db = require('quick.db') // npm i quick.db 2 | 3 | module.exports = { 4 | commands: ['unlock-ticket'], // You Can Keep Any Name 5 | permissions: 'MANAGE_CHANNELS', // You Can Keep Any Permission 6 | permissionError: 'You Cant Use This COmmand', // Optional 7 | description: 'UnLock Ticket', // Optional 8 | 9 | callback: (message, args) => { 10 | 11 | if(message.channel.name.includes('ticket')) return // If Channel Isn't Ticket Channel, Won't Work 12 | else { 13 | const memberinticket = db.fetch(`ticket-user_${message.channel.id}`) // Get User In Ticket 14 | message.channel.updateOverwrite(memberinticket, { 15 | SEND_MESSAGES: true 16 | }) // Permission 17 | message.channel.send(`UnLocked Ticket`) 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Episode 40/commands/Per-Server-Commands/Reset/resetcahtbot.js: -------------------------------------------------------------------------------- 1 | const db = require('quick.db') 2 | 3 | module.exports = { 4 | commands: ['resetchatbot', 'reset-chat-bot'], // You Can Keep Any Name 5 | description: 'ReSet Chat Bot Channel', // Optional 6 | permissions: 'MANAGE_CHANNELS', // You Can Keep Any Permission 7 | permissionError: 'You Dont Have Permission To Use This Command', // Optional 8 | 9 | callback: async(message, args, client) => { 10 | 11 | const chatbotchannel = db.fetch(`chatbotchannel_${message.guild.id}`) 12 | if(chatbotchannel === null) return message.reply(`Chat Bot Channel Isnot Set.`) // If Chat Bot Channel Isnot Set 13 | else if(chatbotchannel !== null) { // If Its Set Then... 14 | message.reply(`Chat Bot Channel Removed`) 15 | db.delete(`chatbotchannel_${message.guild.id}`) // Delete Chat Bot Channel 16 | } 17 | 18 | } 19 | } -------------------------------------------------------------------------------- /Episode 40/commands/Per-Server-Commands/Reset/resetprefix.js: -------------------------------------------------------------------------------- 1 | const db = require('quick.db') 2 | 3 | module.exports = { 4 | commands: ['reset-prefix'], // You Can Keep Any Name 5 | description: 'ReSet Prefix For Server', // Optional 6 | permissions: 'MANAGE_GUILD', // You Can Keep Any Permission 7 | permissionError: 'You Dont Have Permission To Use This Command', // Optional 8 | 9 | callback: async(message, args, client) => { 10 | 11 | const prefix = db.fetch(`prefix_${message.guild.id}`) // Get Old Prefix 12 | if(prefix === null) return message.reply('Prefix Not Set For This Server') // If No Prefix Is Set Yet 13 | else if(prefix !== null) { // If Prefix Is Set Then... 14 | message.reply('Prefix Reset To **+**') 15 | db.delete(`prefix_${message.guild.id}`) // Delete Prefix And Set To Default Prefix 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /Episode 40/commands/Per-Server-Commands/Set/setprefix.js: -------------------------------------------------------------------------------- 1 | const db = require('quick.db') 2 | 3 | module.exports = { 4 | commands: ['set-prefix'], // You Can Keep Any Name 5 | description: 'Set Prefix For Server', // Optional 6 | permissions: 'MANAGE_GUILD', // You Can Keep Any Permission 7 | permissionError: 'You Dont Have Permission To Use This Command', // Optional 8 | 9 | callback: async(message, args, client) => { 10 | 11 | const newprefix = args[0] // New Prefix 12 | if(!newprefix) return message.reply('What Prefix Do You Want To Keep As?') // If No Prefix Is Added 13 | else if(newprefix.length > 4) return message.reply('Your Prefix Is Too Long, Chose Shorter(Less Then 4 Character)') // If Prefix Is More Then 4 Character's 14 | else { 15 | message.reply(`Prefix Set As **${newprefix}**`) 16 | db.set(`prefix_${message.guild.id}`, newprefix) // Set New Prefix 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /Episode 40/commands/load-commands.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | const fs = require('fs') 3 | 4 | module.exports = (client) => { 5 | const baseFile = 'command-base.js' 6 | const commandBase = require(`./${baseFile}`) 7 | 8 | const commands = [] 9 | 10 | const readCommands = (dir) => { 11 | const files = fs.readdirSync(path.join(__dirname, dir)) 12 | for (const file of files) { 13 | const stat = fs.lstatSync(path.join(__dirname, dir, file)) 14 | if (stat.isDirectory()) { 15 | readCommands(path.join(dir, file)) 16 | } else if (file !== baseFile && file !== 'load-commands.js') { 17 | const option = require(path.join(__dirname, dir, file)) 18 | commands.push(option) 19 | if (client) { 20 | commandBase(client, option) 21 | } 22 | } 23 | } 24 | } 25 | 26 | readCommands('.') 27 | 28 | return commands 29 | } 30 | -------------------------------------------------------------------------------- /Episode 40/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "token": "Your-Token", 3 | "def_prefix": "+" 4 | } 5 | -------------------------------------------------------------------------------- /Episode 40/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tutorial-bot", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "TechTipCyber", 10 | "license": "ISC", 11 | "dependencies": { 12 | "@discordjs/opus": "^0.3.3", 13 | "@distube/ytpl": "^1.0.10", 14 | "canvas": "^2.7.0", 15 | "cpu-stat": "^2.0.1", 16 | "discord.js": "^12.5.1", 17 | "ffmpeg": "0.0.4", 18 | "ffmpeg-static": "^4.2.7", 19 | "moment": "^2.29.1", 20 | "ms": "^2.1.3", 21 | "node-fetch": "^2.6.1", 22 | "node-opus": "^0.3.3", 23 | "opusscript": "0.0.7", 24 | "os": "^0.1.1", 25 | "parse-ms": "^2.1.0", 26 | "path": "^0.12.7", 27 | "quick.db": "^7.1.3", 28 | "tech-tip-cyber": "^1.1.8", 29 | "youtube-sr": "^2.0.5", 30 | "ytdl-core": "^4.0.5" 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Episode 45/commands/Main-Commands/Economy/Shop/shop.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | const db = require('quick.db') // npm i quick.db 3 | 4 | module.exports = { 5 | commands: ['shop'], // You Can Keep Any Name 6 | description: 'See Items In Shops', // Optional 7 | 8 | callback: async(message, args, client) => { 9 | 10 | const prefix = db.fetch(`prefix_${message.guild.id}`) 11 | 12 | const embed = new MessageEmbed() 13 | .setAuthor('Shop') 14 | .setTimestamp() 15 | .setColor('RANDOM') 16 | .addField('Laptop:', `Price:- \`$10,000\`\nUse Laptop To Post Meme And More\nUsage:- \`${prefix}buy laptop\``) 17 | .addField('Laptop:', `Price:- \`$15,000\`\nUse Fish Rod To Fish\nUsage:- \`${prefix}buy fish rod\``) 18 | .setFooter('Shop') 19 | message.channel.send(embed) 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Episode 45/commands/Main-Commands/Fun/ping.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['p', 'ping'], // You Can Keep Any Name 3 | description: 'Smple Ping Command', //Optional 4 | callback: (message, args) => { 5 | message.channel.send('Pong!') 6 | } 7 | } -------------------------------------------------------------------------------- /Episode 45/commands/Main-Commands/Fun/youtube.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['youtube', 'yt'], // You Can Keep Any Name 3 | description: 'Sends YT Link', // Optional 4 | callback: (message, args) => { 5 | message.channel.send('https://youtube.com/techtipcyber') 6 | } 7 | } -------------------------------------------------------------------------------- /Episode 45/commands/Main-Commands/Mod/ban.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | 3 | module.exports = { 4 | commands: 'ban', // You Can Keep Any Name 5 | description: 'Bans A User.', // Optional 6 | permissions: 'BAN_MEMBERS', // You Can Keep Any Permissions 7 | permissionError: 'You Dont Have Perms To Ban Someone', // Optional 8 | expectedArgs: '+ban @User', // Optional 9 | 10 | callback: (message, args) => { 11 | const member = message.mentions.members.first() 12 | if(!member) return message.reply('You Need To Mention A Member To Ban.') // Mention To Ban. 13 | member.ban() 14 | 15 | const embed = new MessageEmbed() 16 | .setTitle('User Banned') 17 | .setDescription(`<@${member.user.id}> Has Been Banned.`) 18 | .addField('Banned By', message.author) 19 | .setColor('RANDOM') 20 | message.channel.send(embed) 21 | } 22 | } -------------------------------------------------------------------------------- /Episode 45/commands/Main-Commands/Mod/kick.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | 3 | module.exports = { 4 | commands: 'kick', // You Can Keep Any Name 5 | description: 'Kicks A User.', // Optional 6 | permissions: 'KICK_MEMBERS', // You Can Keep Any Permissions 7 | permissionError: 'You Dont Have Perms To Kick Someone', 8 | expectedArgs: '+Kick @User', // Optional 9 | 10 | callback: (message, args) => { 11 | const member = message.mentions.members.first() 12 | if(!member) return message.reply('You Need To Mention A Member To Kick.') // Mention To Kick. 13 | member.kick() 14 | 15 | const embed = new MessageEmbed() 16 | .setTitle('User Kicked') 17 | .setDescription(`<@${member.user.id}> Has Been Kicked.`) 18 | .addField('Kicked By', message.author) 19 | .setColor('RANDOM') 20 | message.channel.send(embed) 21 | } 22 | } -------------------------------------------------------------------------------- /Episode 45/commands/Main-Commands/Mod/member-count.js: -------------------------------------------------------------------------------- 1 | module.exports = (client) => { 2 | const membercountchannel = '811119579580465182' // Channel Where You Want To Display Member COunt 3 | 4 | const updateMembers = (guild) => { 5 | const channel = guild.channels.cache.get(membercountchannel) 6 | channel.setName(`Member:- ${guild.memberCount.toLocaleString()}`) // Set Channel Name 7 | } 8 | //Updating Member Count WhenEver A User Joins Or Leave 9 | client.on('guildMemberAdd', (member) => updateMembers(member.guild)) 10 | client.on('guildMemberRemove', (member) => updateMembers(member.guild)) 11 | 12 | const guild = client.guilds.cache.get('787083837833871400') // Server ID 13 | updateMembers(guild) 14 | } -------------------------------------------------------------------------------- /Episode 45/commands/Main-Commands/Mod/purge.js: -------------------------------------------------------------------------------- 1 | module.exports ={ 2 | commands: ['del', 'purge'], // You Can Keep Any Name 3 | permissions: 'ADMINISTRATOR', // You Can Keep Any Permission 4 | permissionError: 'You Cant Use It', 5 | description: 'Deletes Message', //Optional 6 | callback: (message, args) => { 7 | const amount = parseInt(args[0]) + 1; 8 | 9 | if (isNaN(amount)) { 10 | return message.channel.send('Please Enter A Number.') 11 | } else if (amount <= 1 || amount > 100) { 12 | return message.channel.send('You Can Only Delete Messages From 1 To 99.') 13 | } 14 | 15 | message.channel.bulkDelete(amount, true).catch(err => { 16 | console.error(err); 17 | message.channel.send('There Was An Error Deleting Messages In This Cahnnel.') 18 | }) 19 | } 20 | } -------------------------------------------------------------------------------- /Episode 45/commands/Main-Commands/Reaction-Roles/setup.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | const EditMessage = require('../../../utils/EditMessage') 3 | 4 | module.exports = (client) => { 5 | EditMessage(client, '811316961400193074', new MessageEmbed() 6 | .setTitle('Reaction Roles') 7 | .setColor('RED') 8 | .setDescription(`**React** 9 | <:Yt:806408246733832232> React With To Get YouTube Role 10 | <:GitHub:811297109953347595> React With To Get GitHub Role 11 | <:VS:811297141669888040> React With To Get Visual Studio Role 12 | <:WikiPedia:811297151069323274> React With To Get WikiPedia Role 13 | `) 14 | .setFooter('Reaction Roles') 15 | , ['<:Yt:806408246733832232>', '<:GitHub:811297109953347595>', '<:VS:811297141669888040>', '<:WikiPedia:811297151069323274>'] 16 | ) 17 | } -------------------------------------------------------------------------------- /Episode 45/commands/Main-Commands/Ticket/Command/close.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['close-ticket', 'ct'], // You Can Keep Any Name 3 | permissions: 'MANAGE_CHANNELS', // You Can Keep Any Permission 4 | permissionError: 'You Cant Use This Command', // Optional 5 | description: 'Close A Opened Ticket', // Optional 6 | 7 | callback: (message, args) => { 8 | if(!message.channel.name.includes('ticket')) return message.reply('You Cant Delete A Normal Channel.') // If Non Ticket Channel Is Tried To Delete 9 | message.channel.delete({ timeout: 5000 }) // Delete Ticket In 5 Seconds 10 | message.channel.send('Deleting Ticket In 5 Seconds') 11 | } 12 | } -------------------------------------------------------------------------------- /Episode 45/commands/Main-Commands/Ticket/Command/lock.js: -------------------------------------------------------------------------------- 1 | const db = require('quick.db') // npm i quick.db 2 | 3 | module.exports = { 4 | commands: ['lock-ticket'], // You Can Keep Any Name 5 | permissions: 'MANAGE_CHANNELS', // You Can Keep Any Permission 6 | permissionError: 'You Cant Use This COmmand', // Optional 7 | description: 'Lock Ticket', // Optional 8 | 9 | callback: (message, args) => { 10 | 11 | if(message.channel.name.includes('ticket')) return // If Channel Isn't Ticket Channel, Won't Work 12 | else { 13 | const memberinticket = db.fetch(`ticket-user_${message.channel.id}`) // Get User In Ticket 14 | message.channel.updateOverwrite(memberinticket, { 15 | SEND_MESSAGES: false 16 | }) // Permission 17 | message.channel.send(`Locked Ticket`) 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /Episode 45/commands/Main-Commands/Ticket/Command/transcript.js: -------------------------------------------------------------------------------- 1 | const { MessageAttachment } = require('discord.js') // Importing discord.js Package For Sending As Attachment 2 | const { fetchMessage } = require('tech-tip-cyber') // Importing Package 3 | 4 | module.exports = { 5 | commands: ['transcrip-ticket', 'ticket-transcrip', 'tt'], // You Can Keep Any Name 6 | description: 'Get Ticket TranScript', // Optional 7 | 8 | callback: (message, args) =>{ 9 | fetchMessage(message, 99).then((data) => { // fetchMessage(message, <10>) It Will Fetch 10 Messages From Channel, Can Be Any Number Less Than 100 10 | const file = new MessageAttachment(data, "fetched.html"); // Making Attachment File 11 | message.channel.send(file); // Send As Attachment 12 | message.channel.send('Download And Open File To See Messages'); 13 | }); 14 | } 15 | } -------------------------------------------------------------------------------- /Episode 45/commands/Main-Commands/Ticket/Command/unlock.js: -------------------------------------------------------------------------------- 1 | const db = require('quick.db') 2 | 3 | module.exports = { 4 | commands: ['unlock-ticket'], // You Can Keep Any Name 5 | permissions: 'MANAGE_CHANNELS', // You Can Keep Any Permission 6 | permissionError: 'You Cant Use This COmmand', // Optional 7 | description: 'UnLock Ticket', // Optional 8 | 9 | callback: (message, args) => { 10 | 11 | if(message.channel.name.includes('ticket')) return // If Channel Isn't Ticket Channel, Won't Work 12 | else { 13 | const memberinticket = db.fetch(`ticket-user_${message.channel.id}`) 14 | message.channel.updateOverwrite(memberinticket, { 15 | SEND_MESSAGES: true 16 | }) 17 | } 18 | message.channel.send(`UnLocked Ticket`) 19 | } 20 | } -------------------------------------------------------------------------------- /Episode 45/commands/Per-Server-Commands/Reset/resetcahtbot.js: -------------------------------------------------------------------------------- 1 | const db = require('quick.db') 2 | 3 | module.exports = { 4 | commands: ['resetchatbot', 'reset-chat-bot'], // You Can Keep Any Name 5 | description: 'ReSet Chat Bot Channel', // Optional 6 | permissions: 'MANAGE_CHANNELS', // You Can Keep Any Permission 7 | permissionError: 'You Dont Have Permission To Use This Command', // Optional 8 | 9 | callback: async(message, args, client) => { 10 | 11 | const chatbotchannel = db.fetch(`chatbotchannel_${message.guild.id}`) 12 | if(chatbotchannel === null) return message.reply(`Chat Bot Channel Isnot Set.`) // If Chat Bot Channel Isnot Set 13 | else if(chatbotchannel !== null) { // If Its Set Then... 14 | message.reply(`Chat Bot Channel Removed`) 15 | db.delete(`chatbotchannel_${message.guild.id}`) // Delete Chat Bot Channel 16 | } 17 | 18 | } 19 | } -------------------------------------------------------------------------------- /Episode 45/commands/Per-Server-Commands/Reset/resetprefix.js: -------------------------------------------------------------------------------- 1 | const db = require('quick.db') 2 | 3 | module.exports = { 4 | commands: ['reset-prefix'], // You Can Keep Any Name 5 | description: 'ReSet Prefix For Server', // Optional 6 | permissions: 'MANAGE_GUILD', // You Can Keep Any Permission 7 | permissionError: 'You Dont Have Permission To Use This Command', // Optional 8 | 9 | callback: async(message, args, client) => { 10 | 11 | const prefix = db.fetch(`prefix_${message.guild.id}`) // Get Old Prefix 12 | if(prefix === null) return message.reply('Prefix Not Set For This Server') // If No Prefix Is Set Yet 13 | else if(prefix !== null) { // If Prefix Is Set Then... 14 | message.reply('Prefix Reset To **+**') 15 | db.delete(`prefix_${message.guild.id}`) // Delete Prefix And Set To Default Prefix 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /Episode 45/commands/Per-Server-Commands/Set/setprefix.js: -------------------------------------------------------------------------------- 1 | const db = require('quick.db') 2 | 3 | module.exports = { 4 | commands: ['set-prefix'], // You Can Keep Any Name 5 | description: 'Set Prefix For Server', // Optional 6 | permissions: 'MANAGE_GUILD', // You Can Keep Any Permission 7 | permissionError: 'You Dont Have Permission To Use This Command', // Optional 8 | 9 | callback: async(message, args, client) => { 10 | 11 | const newprefix = args[0] // New Prefix 12 | if(!newprefix) return message.reply('What Prefix Do You Want To Keep As?') // If No Prefix Is Added 13 | else if(newprefix.length > 4) return message.reply('Your Prefix Is Too Long, Chose Shorter(Less Then 4 Character)') // If Prefix Is More Then 4 Character's 14 | else { 15 | message.reply(`Prefix Set As **${newprefix}**`) 16 | db.set(`prefix_${message.guild.id}`, newprefix) // Set New Prefix 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /Episode 45/commands/load-commands.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | const fs = require('fs') 3 | 4 | module.exports = (client) => { 5 | const baseFile = 'command-base.js' 6 | const commandBase = require(`./${baseFile}`) 7 | 8 | const commands = [] 9 | 10 | const readCommands = (dir) => { 11 | const files = fs.readdirSync(path.join(__dirname, dir)) 12 | for (const file of files) { 13 | const stat = fs.lstatSync(path.join(__dirname, dir, file)) 14 | if (stat.isDirectory()) { 15 | readCommands(path.join(dir, file)) 16 | } else if (file !== baseFile && file !== 'load-commands.js') { 17 | const option = require(path.join(__dirname, dir, file)) 18 | commands.push(option) 19 | if (client) { 20 | commandBase(client, option) 21 | } 22 | } 23 | } 24 | } 25 | 26 | readCommands('.') 27 | 28 | return commands 29 | } 30 | -------------------------------------------------------------------------------- /Episode 45/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "token": "Your-Token", 3 | "def_prefix": "+" 4 | } 5 | -------------------------------------------------------------------------------- /Episode 50/commands/Main-Commands/Economy/Shop/shop.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | const db = require('quick.db') // npm i quick.db 3 | 4 | module.exports = { 5 | commands: ['shop'], // You Can Keep Any Name 6 | description: 'See Items In Shops', // Optional 7 | 8 | callback: async(message, args, client) => { 9 | 10 | const prefix = db.fetch(`prefix_${message.guild.id}`) 11 | 12 | const embed = new MessageEmbed() 13 | .setAuthor('Shop') 14 | .setTimestamp() 15 | .setColor('RANDOM') 16 | .addField('Laptop:', `Price:- \`$10,000\`\nUse Laptop To Post Meme And More\nUsage:- \`${prefix}buy laptop\``) 17 | .addField('Laptop:', `Price:- \`$15,000\`\nUse Fish Rod To Fish\nUsage:- \`${prefix}buy fish rod\``) 18 | .setFooter('Shop') 19 | message.channel.send(embed) 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Episode 50/commands/Main-Commands/Fun/ping.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['p', 'ping'], // You Can Keep Any Name 3 | description: 'Smple Ping Command', //Optional 4 | callback: (message, args) => { 5 | message.channel.send('Pong!') 6 | } 7 | } -------------------------------------------------------------------------------- /Episode 50/commands/Main-Commands/Fun/youtube.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['youtube', 'yt'], // You Can Keep Any Name 3 | description: 'Sends YT Link', // Optional 4 | callback: (message, args) => { 5 | message.channel.send('https://youtube.com/techtipcyber') 6 | } 7 | } -------------------------------------------------------------------------------- /Episode 50/commands/Main-Commands/Mod/ban.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | 3 | module.exports = { 4 | commands: 'ban', // You Can Keep Any Name 5 | description: 'Bans A User.', // Optional 6 | permissions: 'BAN_MEMBERS', // You Can Keep Any Permissions 7 | permissionError: 'You Dont Have Perms To Ban Someone', // Optional 8 | expectedArgs: '+ban @User', // Optional 9 | 10 | callback: (message, args) => { 11 | const member = message.mentions.members.first() 12 | if(!member) return message.reply('You Need To Mention A Member To Ban.') // Mention To Ban. 13 | member.ban() 14 | 15 | const embed = new MessageEmbed() 16 | .setTitle('User Banned') 17 | .setDescription(`<@${member.user.id}> Has Been Banned.`) 18 | .addField('Banned By', message.author) 19 | .setColor('RANDOM') 20 | message.channel.send(embed) 21 | } 22 | } -------------------------------------------------------------------------------- /Episode 50/commands/Main-Commands/Mod/kick.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | 3 | module.exports = { 4 | commands: 'kick', // You Can Keep Any Name 5 | description: 'Kicks A User.', // Optional 6 | permissions: 'KICK_MEMBERS', // You Can Keep Any Permissions 7 | permissionError: 'You Dont Have Perms To Kick Someone', 8 | expectedArgs: '+Kick @User', // Optional 9 | 10 | callback: (message, args) => { 11 | const member = message.mentions.members.first() 12 | if(!member) return message.reply('You Need To Mention A Member To Kick.') // Mention To Kick. 13 | member.kick() 14 | 15 | const embed = new MessageEmbed() 16 | .setTitle('User Kicked') 17 | .setDescription(`<@${member.user.id}> Has Been Kicked.`) 18 | .addField('Kicked By', message.author) 19 | .setColor('RANDOM') 20 | message.channel.send(embed) 21 | } 22 | } -------------------------------------------------------------------------------- /Episode 50/commands/Main-Commands/Mod/member-count.js: -------------------------------------------------------------------------------- 1 | module.exports = (client) => { 2 | const membercountchannel = '811119579580465182' // Channel Where You Want To Display Member COunt 3 | 4 | const updateMembers = (guild) => { 5 | const channel = guild.channels.cache.get(membercountchannel) 6 | channel.setName(`Member:- ${guild.memberCount.toLocaleString()}`) // Set Channel Name 7 | } 8 | //Updating Member Count WhenEver A User Joins Or Leave 9 | client.on('guildMemberAdd', (member) => updateMembers(member.guild)) 10 | client.on('guildMemberRemove', (member) => updateMembers(member.guild)) 11 | 12 | const guild = client.guilds.cache.get('787083837833871400') // Server ID 13 | updateMembers(guild) 14 | } -------------------------------------------------------------------------------- /Episode 50/commands/Main-Commands/Mod/purge.js: -------------------------------------------------------------------------------- 1 | module.exports ={ 2 | commands: ['del', 'purge'], // You Can Keep Any Name 3 | permissions: 'ADMINISTRATOR', // You Can Keep Any Permission 4 | permissionError: 'You Cant Use It', 5 | description: 'Deletes Message', //Optional 6 | callback: (message, args) => { 7 | const amount = parseInt(args[0]) + 1; 8 | 9 | if (isNaN(amount)) { 10 | return message.channel.send('Please Enter A Number.') 11 | } else if (amount <= 1 || amount > 100) { 12 | return message.channel.send('You Can Only Delete Messages From 1 To 99.') 13 | } 14 | 15 | message.channel.bulkDelete(amount, true).catch(err => { 16 | console.error(err); 17 | message.channel.send('There Was An Error Deleting Messages In This Cahnnel.') 18 | }) 19 | } 20 | } -------------------------------------------------------------------------------- /Episode 50/commands/Main-Commands/Reaction-Roles/setup.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | const EditMessage = require('../../../utils/EditMessage') 3 | 4 | module.exports = (client) => { 5 | EditMessage(client, '811316961400193074', new MessageEmbed() 6 | .setTitle('Reaction Roles') 7 | .setColor('RED') 8 | .setDescription(`**React** 9 | <:Yt:806408246733832232> React With To Get YouTube Role 10 | <:GitHub:811297109953347595> React With To Get GitHub Role 11 | <:VS:811297141669888040> React With To Get Visual Studio Role 12 | <:WikiPedia:811297151069323274> React With To Get WikiPedia Role 13 | `) 14 | .setFooter('Reaction Roles') 15 | , ['<:Yt:806408246733832232>', '<:GitHub:811297109953347595>', '<:VS:811297141669888040>', '<:WikiPedia:811297151069323274>'] 16 | ) 17 | } -------------------------------------------------------------------------------- /Episode 50/commands/Main-Commands/Ticket/Command/close.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | commands: ['close-ticket', 'ct'], // You Can Keep Any Name 3 | permissions: 'MANAGE_CHANNELS', // You Can Keep Any Permission 4 | permissionError: 'You Cant Use This Command', // Optional 5 | description: 'Close A Opened Ticket', // Optional 6 | 7 | callback: (message, args) => { 8 | if(!message.channel.name.includes('ticket')) return message.reply('You Cant Delete A Normal Channel.') // If Non Ticket Channel Is Tried To Delete 9 | message.channel.delete({ timeout: 5000 }) // Delete Ticket In 5 Seconds 10 | message.channel.send('Deleting Ticket In 5 Seconds') 11 | } 12 | } -------------------------------------------------------------------------------- /Episode 50/commands/Main-Commands/Ticket/Command/lock.js: -------------------------------------------------------------------------------- 1 | const db = require('quick.db') // npm i quick.db 2 | 3 | module.exports = { 4 | commands: ['lock-ticket'], // You Can Keep Any Name 5 | permissions: 'MANAGE_CHANNELS', // You Can Keep Any Permission 6 | permissionError: 'You Cant Use This COmmand', // Optional 7 | description: 'Lock Ticket', // Optional 8 | 9 | callback: (message, args) => { 10 | 11 | if(message.channel.name.includes('ticket')) return // If Channel Isn't Ticket Channel, Won't Work 12 | else { 13 | const memberinticket = db.fetch(`ticket-user_${message.channel.id}`) // Get User In Ticket 14 | message.channel.updateOverwrite(memberinticket, { 15 | SEND_MESSAGES: false 16 | }) // Permission 17 | message.channel.send(`Locked Ticket`) 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /Episode 50/commands/Main-Commands/Ticket/Command/transcript.js: -------------------------------------------------------------------------------- 1 | const { MessageAttachment } = require('discord.js') // Importing discord.js Package For Sending As Attachment 2 | const { fetchMessage } = require('tech-tip-cyber') // Importing Package 3 | 4 | module.exports = { 5 | commands: ['transcrip-ticket', 'ticket-transcrip', 'tt'], // You Can Keep Any Name 6 | description: 'Get Ticket TranScript', // Optional 7 | 8 | callback: (message, args) =>{ 9 | fetchMessage(message, 99).then((data) => { // fetchMessage(message, <10>) It Will Fetch 10 Messages From Channel, Can Be Any Number Less Than 100 10 | const file = new MessageAttachment(data, "fetched.html"); // Making Attachment File 11 | message.channel.send(file); // Send As Attachment 12 | message.channel.send('Download And Open File To See Messages'); 13 | }); 14 | } 15 | } -------------------------------------------------------------------------------- /Episode 50/commands/Main-Commands/Ticket/Command/unlock.js: -------------------------------------------------------------------------------- 1 | const db = require('quick.db') 2 | 3 | module.exports = { 4 | commands: ['unlock-ticket'], // You Can Keep Any Name 5 | permissions: 'MANAGE_CHANNELS', // You Can Keep Any Permission 6 | permissionError: 'You Cant Use This COmmand', // Optional 7 | description: 'UnLock Ticket', // Optional 8 | 9 | callback: (message, args) => { 10 | 11 | if(message.channel.name.includes('ticket')) return // If Channel Isn't Ticket Channel, Won't Work 12 | else { 13 | const memberinticket = db.fetch(`ticket-user_${message.channel.id}`) 14 | message.channel.updateOverwrite(memberinticket, { 15 | SEND_MESSAGES: true 16 | }) 17 | } 18 | message.channel.send(`UnLocked Ticket`) 19 | } 20 | } -------------------------------------------------------------------------------- /Episode 50/commands/Per-Server-Commands/Reset/resetcahtbot.js: -------------------------------------------------------------------------------- 1 | const db = require('quick.db') 2 | 3 | module.exports = { 4 | commands: ['resetchatbot', 'reset-chat-bot'], // You Can Keep Any Name 5 | description: 'ReSet Chat Bot Channel', // Optional 6 | permissions: 'MANAGE_CHANNELS', // You Can Keep Any Permission 7 | permissionError: 'You Dont Have Permission To Use This Command', // Optional 8 | 9 | callback: async(message, args, client) => { 10 | 11 | const chatbotchannel = db.fetch(`chatbotchannel_${message.guild.id}`) 12 | if(chatbotchannel === null) return message.reply(`Chat Bot Channel Isnot Set.`) // If Chat Bot Channel Isnot Set 13 | else if(chatbotchannel !== null) { // If Its Set Then... 14 | message.reply(`Chat Bot Channel Removed`) 15 | db.delete(`chatbotchannel_${message.guild.id}`) // Delete Chat Bot Channel 16 | } 17 | 18 | } 19 | } -------------------------------------------------------------------------------- /Episode 50/commands/Per-Server-Commands/Reset/resetlevelupchan.js: -------------------------------------------------------------------------------- 1 | const db = require('quick.db') 2 | 3 | module.exports = { 4 | commands: ['resetlevelup', 'reset-level-up'], // You Can Keep Any Name 5 | description: 'ReSet Level Up Channel', // Optional 6 | permissions: 'MANAGE_CHANNELS', // You Can Keep Any Permission 7 | permissionError: 'You Dont Have Permission To Use This Command', // Optional 8 | 9 | callback: async(message, args, client) => { 10 | 11 | const levelupchannel = db.fetch(`levelupchannel_${message.guild.id}`) 12 | if(levelupchannel === null) return message.reply(`Level Up Channel Isn't Set.`) // If Level Up Channel Isnot Set 13 | else if(levelupchannel !== null) { // If Its Set Then... 14 | message.reply(`Level Up Channel Removed`) 15 | db.delete(`levelupchannel_${message.guild.id}`) // Delete Level Up Channel 16 | } 17 | 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Episode 50/commands/Per-Server-Commands/Reset/resetprefix.js: -------------------------------------------------------------------------------- 1 | const db = require('quick.db') 2 | 3 | module.exports = { 4 | commands: ['reset-prefix'], // You Can Keep Any Name 5 | description: 'ReSet Prefix For Server', // Optional 6 | permissions: 'MANAGE_GUILD', // You Can Keep Any Permission 7 | permissionError: 'You Dont Have Permission To Use This Command', // Optional 8 | 9 | callback: async(message, args, client) => { 10 | 11 | const prefix = db.fetch(`prefix_${message.guild.id}`) // Get Old Prefix 12 | if(prefix === null) return message.reply('Prefix Not Set For This Server') // If No Prefix Is Set Yet 13 | else if(prefix !== null) { // If Prefix Is Set Then... 14 | message.reply('Prefix Reset To **+**') 15 | db.delete(`prefix_${message.guild.id}`) // Delete Prefix And Set To Default Prefix 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /Episode 50/commands/Per-Server-Commands/Reset/resetrankbg.js: -------------------------------------------------------------------------------- 1 | const db = require('quick.db') 2 | 3 | module.exports = { 4 | commands: ['reset-rank-bg'], // You Can Keep Any Name 5 | description: 'ReSet Rank BackGround For Server', // Optional 6 | permissions: 'MANAGE_GUILD', // You Can Keep Any Permission 7 | permissionError: 'You Dont Have Permission To Use This Command', // Optional 8 | 9 | callback: async(message, args, client) => { 10 | 11 | const link = 'https://i.imgur.com/SpcEOfc.jpg' // New Link 12 | message.reply(`Rank Image Set As **${link}**`) 13 | db.set(`backgroundrank_${message.guild.id}`, link) // Set New Link(Image) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Episode 50/commands/Per-Server-Commands/Set/setprefix.js: -------------------------------------------------------------------------------- 1 | const db = require('quick.db') 2 | 3 | module.exports = { 4 | commands: ['set-prefix'], // You Can Keep Any Name 5 | description: 'Set Prefix For Server', // Optional 6 | permissions: 'MANAGE_GUILD', // You Can Keep Any Permission 7 | permissionError: 'You Dont Have Permission To Use This Command', // Optional 8 | 9 | callback: async(message, args, client) => { 10 | 11 | const newprefix = args[0] // New Prefix 12 | if(!newprefix) return message.reply('What Prefix Do You Want To Keep As?') // If No Prefix Is Added 13 | else if(newprefix.length > 4) return message.reply('Your Prefix Is Too Long, Chose Shorter(Less Then 4 Character)') // If Prefix Is More Then 4 Character's 14 | else { 15 | message.reply(`Prefix Set As **${newprefix}**`) 16 | db.set(`prefix_${message.guild.id}`, newprefix) // Set New Prefix 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /Episode 50/commands/Per-Server-Commands/Set/setrankbg.js: -------------------------------------------------------------------------------- 1 | const db = require('quick.db') 2 | 3 | module.exports = { 4 | commands: ['set-rank-bg'], // You Can Keep Any Name 5 | description: 'Set Rank BackGround For Server', // Optional 6 | permissions: 'MANAGE_GUILD', // You Can Keep Any Permission 7 | permissionError: 'You Dont Have Permission To Use This Command', // Optional 8 | 9 | callback: async(message, args, client) => { 10 | 11 | const link = args[0] // New Link 12 | if(!link) return message.reply('Provide Link For Rank BackGround') // If No Link Is Added 13 | else { 14 | message.reply(`Rank Image Set As **${link}**`) 15 | db.set(`backgroundrank_${message.guild.id}`, link) // Set New Link(Image) 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Episode 50/commands/load-commands.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | const fs = require('fs') 3 | 4 | module.exports = (client) => { 5 | const baseFile = 'command-base.js' 6 | const commandBase = require(`./${baseFile}`) 7 | 8 | const commands = [] 9 | 10 | const readCommands = (dir) => { 11 | const files = fs.readdirSync(path.join(__dirname, dir)) 12 | for (const file of files) { 13 | const stat = fs.lstatSync(path.join(__dirname, dir, file)) 14 | if (stat.isDirectory()) { 15 | readCommands(path.join(dir, file)) 16 | } else if (file !== baseFile && file !== 'load-commands.js') { 17 | const option = require(path.join(__dirname, dir, file)) 18 | commands.push(option) 19 | if (client) { 20 | commandBase(client, option) 21 | } 22 | } 23 | } 24 | } 25 | 26 | readCommands('.') 27 | 28 | return commands 29 | } 30 | -------------------------------------------------------------------------------- /Episode 50/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "token": "Your-Token", 3 | "def_prefix": "+" 4 | } 5 | --------------------------------------------------------------------------------