Skip to content

Commit

Permalink
🎉 Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Log1x committed Jan 8, 2024
0 parents commit 43761fe
Show file tree
Hide file tree
Showing 20 changed files with 1,891 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
quote_type = single

[*.md]
trim_trailing_whitespace = false

[*.php]
indent_size = 4

[*.blade.php]
indent_size = 2

[resources/views/**.php]
indent_size = 2

[index.php]
indent_size = 2
6 changes: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
* text=auto eol=lf
/.github export-ignore
.scrutinizer.yml export-ignore
BACKERS.md export-ignore
CONTRIBUTING.md export-ignore
CHANGELOG.md export-ignore
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/vendor
composer.lock
5 changes: 5 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"semi": false,
"singleQuote": true,
"trailingComma": "es5"
}
41 changes: 41 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"name": "laracord/framework",
"type": "package",
"description": "The Laracord Framework.",
"keywords": ["framework", "laravel", "discord"],
"license": "MIT",
"homepage": "https://laracord.com",
"authors": [
{
"name": "Brandon Nifong",
"email": "[email protected]",
"homepage": "https://github.com/log1x"
}
],
"require": {
"php": "^8.1",
"guzzlehttp/guzzle": "^7.5",
"illuminate/database": "^10.0",
"illuminate/http": "^10.0",
"laravel-zero/framework": "^10.2",
"nunomaduro/termwind": "^1.15.1",
"openai-php/client": "^0.8.0",
"react/child-process": "^0.6.5",
"react/event-loop": "^1.5",
"team-reflex/discord-php": "^7.3"
},
"require-dev": {
"laravel/pint": "^1.13"
},
"autoload": {
"psr-4": {
"Laracord\\": "src/"
}
},
"config": {
"sort-packages": true,
"allow-plugins": {
"php-http/discovery": true
}
}
}
85 changes: 85 additions & 0 deletions config/commands.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<?php

return [

/*
|--------------------------------------------------------------------------
| Default Command
|--------------------------------------------------------------------------
|
| Laravel Zero will always run the command specified below when no command name is
| provided. Consider update the default command for single command applications.
| You cannot pass arguments to the default command because they are ignored.
|
*/

'default' => Laracord\Console\Commands\BootCommand::class,

/*
|--------------------------------------------------------------------------
| Commands Paths
|--------------------------------------------------------------------------
|
| This value determines the "paths" that should be loaded by the console's
| kernel. Foreach "path" present on the array provided below the kernel
| will extract all "Illuminate\Console\Command" based class commands.
|
*/

'paths' => [
app_path('Console/Commands'),
],

/*
|--------------------------------------------------------------------------
| Added Commands
|--------------------------------------------------------------------------
|
| You may want to include a single command class without having to load an
| entire folder. Here you can specify which commands should be added to
| your list of commands. The console's kernel will try to load them.
|
*/

'add' => [
// ..
],

/*
|--------------------------------------------------------------------------
| Hidden Commands
|--------------------------------------------------------------------------
|
| Your application commands will always be visible on the application list
| of commands. But you can still make them "hidden" specifying an array
| of commands below. All "hidden" commands can still be run/executed.
|
*/

'hidden' => [
NunoMaduro\LaravelConsoleSummary\SummaryCommand::class,
Symfony\Component\Console\Command\DumpCompletionCommand::class,
Symfony\Component\Console\Command\HelpCommand::class,
Illuminate\Console\Scheduling\ScheduleRunCommand::class,
Illuminate\Console\Scheduling\ScheduleListCommand::class,
Illuminate\Console\Scheduling\ScheduleFinishCommand::class,
Illuminate\Foundation\Console\VendorPublishCommand::class,
LaravelZero\Framework\Commands\StubPublishCommand::class,
],

/*
|--------------------------------------------------------------------------
| Removed Commands
|--------------------------------------------------------------------------
|
| Do you have a service provider that loads a list of commands that
| you don't need? No problem. Laravel Zero allows you to specify
| below a list of commands that you don't to see in your app.
|
*/

'remove' => [
LaravelZero\Framework\Commands\MakeCommand::class,
],

];
101 changes: 101 additions & 0 deletions config/database.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
<?php

use Illuminate\Support\Str;

return [

/*
|--------------------------------------------------------------------------
| Default Database Connection Name
|--------------------------------------------------------------------------
|
| Here you may specify which of the database connections below you wish
| to use as your default connection for all database work. Of course
| you may use many connections at once using the Database library.
|
*/

'default' => env('DB_CONNECTION', 'sqlite'),

/*
|--------------------------------------------------------------------------
| Database Connections
|--------------------------------------------------------------------------
|
| Here are each of the database connections setup for your application.
| Of course, examples of configuring each database platform that is
| supported by Laravel is shown below to make development simple.
|
|
| All database work in Laravel is done through the PHP PDO facilities
| so make sure you have the driver for your particular database of
| choice installed on your machine before you begin development.
|
*/

'connections' => [

'sqlite' => [
'driver' => 'sqlite',
'url' => env('DATABASE_URL'),
'database' => config('app.env') === 'production' ?
getcwd().'/database/database.sqlite' :
env('DB_DATABASE', database_path('database.sqlite')),
'prefix' => '',
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
],

],

/*
|--------------------------------------------------------------------------
| Migration Repository Table
|--------------------------------------------------------------------------
|
| This table keeps track of all the migrations that have already run for
| your application. Using this information, we can determine which of
| the migrations on disk haven't actually been run in the database.
|
*/

'migrations' => 'migrations',

/*
|--------------------------------------------------------------------------
| Redis Databases
|--------------------------------------------------------------------------
|
| Redis is an open source, fast, and advanced key-value store that also
| provides a richer body of commands than a typical key-value system
| such as APC or Memcached. Laravel makes it easy to dig right in.
|
*/

'redis' => [

'client' => env('REDIS_CLIENT', 'phpredis'),

'options' => [
'cluster' => env('REDIS_CLUSTER', 'redis'),
'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'),
],

'default' => [
'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST', '127.0.0.1'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', '6379'),
'database' => env('REDIS_DB', '0'),
],

'cache' => [
'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST', '127.0.0.1'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', '6379'),
'database' => env('REDIS_CACHE_DB', '1'),
],

],

];
57 changes: 57 additions & 0 deletions config/discord.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<?php

return [

/*
|--------------------------------------------------------------------------
| Discord Bot Description
|--------------------------------------------------------------------------
|
| Here you may specify the description of your Discord bot. This will be
| used when the bot is mentioned in chat, or when you run the "servers"
| command. Change this to anything you like.
|
*/

'description' => env('DISCORD_BOT_DESCRIPTION', 'The Laracord Discord Bot.'),

/*
|--------------------------------------------------------------------------
| Discord Token
|--------------------------------------------------------------------------
|
| Here you may specify your Discord bot token. You can find it under the
| "Bot" section of your Discord application. Make sure to keep this
| token private and never share it with anyone for security.
|
*/

'token' => env('DISCORD_TOKEN', ''),

/*
|--------------------------------------------------------------------------
| Command Prefix
|--------------------------------------------------------------------------
|
| Here you may specify the command prefix for the Discord bot. This
| prefix will be used to distinguish commands from regular chat
| messages. You may change this to anything you like.
|
*/

'prefix' => env('DISCORD_COMMAND_PREFIX', '!'),

/*
|--------------------------------------------------------------------------
| Help Command
|--------------------------------------------------------------------------
|
| Here you may specify whether the help command should be enabled. This
| command will display a list of all available commands. You may
| change this to `false` if you don't want to use this.
|
*/

'help' => true,

];
Loading

0 comments on commit 43761fe

Please sign in to comment.